diff options
author | jan64 <jan64.email@gmail.com> | 2015-06-07 15:21:18 +0200 |
---|---|---|
committer | jan64 <jan64.email@gmail.com> | 2015-06-07 15:21:18 +0200 |
commit | be4a5a0803e17e5e7a54fb8ef98935d022846c0f (patch) | |
tree | 3e38002cf61fce148cf0bd2e86a71061f983f1b8 /src | |
parent | Added SendSystemMessage / SendAboveActionBarMessage to the docs (diff) | |
download | cuberite-be4a5a0803e17e5e7a54fb8ef98935d022846c0f.tar cuberite-be4a5a0803e17e5e7a54fb8ef98935d022846c0f.tar.gz cuberite-be4a5a0803e17e5e7a54fb8ef98935d022846c0f.tar.bz2 cuberite-be4a5a0803e17e5e7a54fb8ef98935d022846c0f.tar.lz cuberite-be4a5a0803e17e5e7a54fb8ef98935d022846c0f.tar.xz cuberite-be4a5a0803e17e5e7a54fb8ef98935d022846c0f.tar.zst cuberite-be4a5a0803e17e5e7a54fb8ef98935d022846c0f.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index e043698dd..3d96071b5 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -1105,8 +1105,8 @@ void cProtocol172::SendExperience (void) cPacketizer Pkt(*this, 0x1f); // Experience Packet cPlayer * Player = m_Client->GetPlayer(); Pkt.WriteBEFloat(Player->GetXpPercentage()); - Pkt.WriteBEInt16(static_cast<Int16>(std::max<int>(Player->GetXpLevel(), std::numeric_limits<Int16>::max()))); - Pkt.WriteBEInt16(static_cast<Int16>(std::max<int>(Player->GetCurrentXp(), std::numeric_limits<Int16>::max()))); + Pkt.WriteBEInt16(static_cast<Int16>(std::min<int>(Player->GetXpLevel(), std::numeric_limits<Int16>::max()))); + Pkt.WriteBEInt16(static_cast<Int16>(std::min<int>(Player->GetCurrentXp(), std::numeric_limits<Int16>::max()))); } |