diff options
author | peterbell10 <peterbell10@live.co.uk> | 2020-10-05 12:27:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-05 12:27:14 +0200 |
commit | a9031b6bae742b333b1b390192fa590f2ecb07ea (patch) | |
tree | b2802c81d24d339c201a0747d66ba44e9ea8b1b0 /src/Protocol/Protocol_1_14.cpp | |
parent | Fixed current end generator (#4968) (diff) | |
download | cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.gz cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.bz2 cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.lz cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.xz cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.zst cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.zip |
Diffstat (limited to 'src/Protocol/Protocol_1_14.cpp')
-rw-r--r-- | src/Protocol/Protocol_1_14.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/Protocol/Protocol_1_14.cpp b/src/Protocol/Protocol_1_14.cpp index 335677155..a77cd2d7d 100644 --- a/src/Protocol/Protocol_1_14.cpp +++ b/src/Protocol/Protocol_1_14.cpp @@ -21,36 +21,6 @@ Implements the 1.14 protocol classes: -#define HANDLE_READ(ByteBuf, Proc, Type, Var) \ - Type Var; \ - do { \ - if (!ByteBuf.Proc(Var))\ - {\ - return;\ - } \ - } while (false) - - - - - -#define HANDLE_PACKET_READ(ByteBuf, Proc, Type, Var) \ - Type Var; \ - do { \ - { \ - if (!ByteBuf.Proc(Var)) \ - { \ - ByteBuf.CheckValid(); \ - return false; \ - } \ - ByteBuf.CheckValid(); \ - } \ - } while (false) - - - - - //////////////////////////////////////////////////////////////////////////////// // cProtocol_1_14: @@ -89,7 +59,7 @@ void cProtocol_1_14::SendLogin(const cPlayer & a_Player, const cWorld & a_World) Pkt.WriteBEInt32(static_cast<Int32>(a_World.GetDimension())); Pkt.WriteBEUInt8(static_cast<UInt8>(Clamp<size_t>(Server->GetMaxPlayers(), 0, 255))); Pkt.WriteString("default"); - Pkt.WriteVarInt32(a_World.GetMaxViewDistance()); + Pkt.WriteVarInt32(ToUnsigned(a_World.GetMaxViewDistance())); Pkt.WriteBool(false); } |