From f8f4ab88f6f8aad918b871c1989fc7698f8cde6a Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 17 Dec 2013 19:56:17 +0100 Subject: Fixed player falling through the floor on spawn. The 1.7 client seems to have math issues with exact coords. Adding 0.001 to the Y coord fixed the problem. --- src/Protocol/Protocol17x.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Protocol/Protocol17x.cpp') 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()); -- cgit v1.2.3