1
0

Fixed bug in entities movement: Corrected proper flooring of double values for the relative move packet, and teleport packet. Also, made the velocity packet to be sent first than the positions packets.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1367 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
keyboard.osh@gmail.com
2013-04-07 06:53:17 +00:00
parent 34f93de4f9
commit 92e782068f
2 changed files with 16 additions and 14 deletions

View File

@@ -725,7 +725,9 @@ void cProtocol125::SendTeleportEntity(const cEntity & a_Entity)
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_ENT_TELEPORT);
WriteInt (a_Entity.GetUniqueID());
WriteVectorI((Vector3i)(a_Entity.GetPosition() * 32));
WriteInt ((int)(floor(a_Entity.GetPosX() * 32)));
WriteInt ((int)(floor(a_Entity.GetPosY() * 32)));
WriteInt ((int)(floor(a_Entity.GetPosZ() * 32)));
WriteByte ((char)((a_Entity.GetRotation() / 360.f) * 256));
WriteByte ((char)((a_Entity.GetPitch() / 360.f) * 256));
Flush();