summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol16x.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-07-08 20:30:27 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-07-08 20:30:27 +0200
commit94a92a219b2e2c00372e2d06e79f83c400a826e7 (patch)
treebd8390127c53402a18d5a4d21b5c98a755e3a3d5 /source/Protocol/Protocol16x.cpp
parentColor codes are stripped from the DC message (diff)
downloadcuberite-94a92a219b2e2c00372e2d06e79f83c400a826e7.tar
cuberite-94a92a219b2e2c00372e2d06e79f83c400a826e7.tar.gz
cuberite-94a92a219b2e2c00372e2d06e79f83c400a826e7.tar.bz2
cuberite-94a92a219b2e2c00372e2d06e79f83c400a826e7.tar.lz
cuberite-94a92a219b2e2c00372e2d06e79f83c400a826e7.tar.xz
cuberite-94a92a219b2e2c00372e2d06e79f83c400a826e7.tar.zst
cuberite-94a92a219b2e2c00372e2d06e79f83c400a826e7.zip
Diffstat (limited to 'source/Protocol/Protocol16x.cpp')
-rw-r--r--source/Protocol/Protocol16x.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/Protocol/Protocol16x.cpp b/source/Protocol/Protocol16x.cpp
index 7036dfbca..d06980228 100644
--- a/source/Protocol/Protocol16x.cpp
+++ b/source/Protocol/Protocol16x.cpp
@@ -100,7 +100,7 @@ void cProtocol161::SendHealth(void)
WriteByte (PACKET_UPDATE_HEALTH);
WriteFloat((float)m_Client->GetPlayer()->GetHealth());
WriteShort(m_Client->GetPlayer()->GetFoodLevel());
- WriteFloat(m_Client->GetPlayer()->GetFoodSaturationLevel());
+ WriteFloat((float)m_Client->GetPlayer()->GetFoodSaturationLevel());
Flush();
}
@@ -123,6 +123,17 @@ void cProtocol161::SendPlayerMaxSpeed(void)
+void cProtocol161::SendRespawn(void)
+{
+ // Besides sending the respawn, we need to also send the player max speed, otherwise the client reverts to super-fast
+ super::SendRespawn();
+ SendPlayerMaxSpeed();
+}
+
+
+
+
+
void cProtocol161::SendWindowOpen(char a_WindowID, char a_WindowType, const AString & a_WindowTitle, char a_NumSlots)
{
if (a_WindowType < 0)