summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol16x.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-04-05 23:12:17 +0200
committerTycho <work.tycho+git@gmail.com>2014-04-05 23:12:17 +0200
commit23395a5ce1daab24465d607575c09e06e5b7c449 (patch)
tree18555c220fc6e602b071a935b190ef25444f18a9 /src/Protocol/Protocol16x.cpp
parentFixed tolua++ override support (diff)
parentFixed Endiannes conversion routines for floats and doubles. (diff)
downloadcuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar.gz
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar.bz2
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar.lz
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar.xz
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.tar.zst
cuberite-23395a5ce1daab24465d607575c09e06e5b7c449.zip
Diffstat (limited to 'src/Protocol/Protocol16x.cpp')
-rw-r--r--src/Protocol/Protocol16x.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Protocol/Protocol16x.cpp b/src/Protocol/Protocol16x.cpp
index ecb24254f..bf7d9a0b1 100644
--- a/src/Protocol/Protocol16x.cpp
+++ b/src/Protocol/Protocol16x.cpp
@@ -119,7 +119,7 @@ void cProtocol161::SendHealth(void)
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_UPDATE_HEALTH);
WriteFloat((float)m_Client->GetPlayer()->GetHealth());
- WriteShort(m_Client->GetPlayer()->GetFoodLevel());
+ WriteShort((short)m_Client->GetPlayer()->GetFoodLevel());
WriteFloat((float)m_Client->GetPlayer()->GetFoodSaturationLevel());
Flush();
}
@@ -163,10 +163,10 @@ void cProtocol161::SendWindowOpen(const cWindow & a_Window)
}
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_WINDOW_OPEN);
- WriteByte (a_Window.GetWindowID());
- WriteByte (a_Window.GetWindowType());
+ WriteChar (a_Window.GetWindowID());
+ WriteByte ((Byte)a_Window.GetWindowType());
WriteString(a_Window.GetWindowTitle());
- WriteByte (a_Window.GetNumNonInventorySlots());
+ WriteByte ((Byte)a_Window.GetNumNonInventorySlots());
WriteByte (1); // Use title
if (a_Window.GetWindowType() == cWindow::wtAnimalChest)
{