1
0

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.
This commit is contained in:
madmaxoft 2013-12-17 19:56:17 +01:00
parent bd568ed089
commit f8f4ab88f6

View File

@ -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());