summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-12-17 19:56:17 +0100
committermadmaxoft <github@xoft.cz>2013-12-17 20:16:06 +0100
commitf8f4ab88f6f8aad918b871c1989fc7698f8cde6a (patch)
tree0f5842887df1de85dbffe4ab953c7c9e97484ef4
parentcBlockArea: origin is initialized in the constructor and the loader. (diff)
downloadcuberite-f8f4ab88f6f8aad918b871c1989fc7698f8cde6a.tar
cuberite-f8f4ab88f6f8aad918b871c1989fc7698f8cde6a.tar.gz
cuberite-f8f4ab88f6f8aad918b871c1989fc7698f8cde6a.tar.bz2
cuberite-f8f4ab88f6f8aad918b871c1989fc7698f8cde6a.tar.lz
cuberite-f8f4ab88f6f8aad918b871c1989fc7698f8cde6a.tar.xz
cuberite-f8f4ab88f6f8aad918b871c1989fc7698f8cde6a.tar.zst
cuberite-f8f4ab88f6f8aad918b871c1989fc7698f8cde6a.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol17x.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 5f939be1e..fff5311f6 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -562,7 +562,11 @@ void cProtocol172::SendPlayerMoveLook(void)
{
cPacketizer Pkt(*this, 0x08); // Player Position And Look packet
Pkt.WriteDouble(m_Client->GetPlayer()->GetPosX());
- Pkt.WriteDouble(m_Client->GetPlayer()->GetStance()); // Protocol docs say this is PosY, but #323 says this is eye-pos
+
+ // Protocol docs say this is PosY, but #323 says this is eye-pos
+ // Moreover, the "+ 0.001" is there because otherwise the player falls through the block they were standing on.
+ Pkt.WriteDouble(m_Client->GetPlayer()->GetStance() + 0.001);
+
Pkt.WriteDouble(m_Client->GetPlayer()->GetPosZ());
Pkt.WriteFloat((float)m_Client->GetPlayer()->GetYaw());
Pkt.WriteFloat((float)m_Client->GetPlayer()->GetPitch());