summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-19 12:50:59 +0200
committertycho <work.tycho@gmail.com>2015-05-19 12:50:59 +0200
commitf2689c4887e6bd66af34de81cd793322f1dd57c4 (patch)
treeb8b78c3f7715797a640dc77b4474e1d2fe347e0c /src/Protocol
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar
cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar.gz
cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar.bz2
cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar.lz
cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar.xz
cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar.zst
cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Packetizer.h2
-rw-r--r--src/Protocol/Protocol17x.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Protocol/Packetizer.h b/src/Protocol/Packetizer.h
index 7f5e9c2c3..efed9c7a9 100644
--- a/src/Protocol/Packetizer.h
+++ b/src/Protocol/Packetizer.h
@@ -58,7 +58,7 @@ public:
}
- inline void WriteBEUInt16(short a_Value)
+ inline void WriteBEUInt16(UInt16 a_Value)
{
VERIFY(m_Out.WriteBEUInt16(a_Value));
}
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 799c021f3..0540ae9e1 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -1023,8 +1023,8 @@ void cProtocol172::SendExperience (void)
cPacketizer Pkt(*this, 0x1f); // Experience Packet
cPlayer * Player = m_Client->GetPlayer();
Pkt.WriteBEFloat(Player->GetXpPercentage());
- Pkt.WriteBEInt16(static_cast<UInt16>(std::max<int>(Player->GetXpLevel(), std::numeric_limits<UInt16>::max())));
- Pkt.WriteBEInt16(static_cast<UInt16>(std::max<int>(Player->GetCurrentXp(), std::numeric_limits<UInt16>::max())));
+ 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())));
}