1
0

More comments!

* Also fixed a potential issue with position sending - if someone moved
slowly enough, their position would never be updated.
This commit is contained in:
Tiger Wang
2014-04-26 23:50:24 +01:00
parent c949c1e755
commit b4b3b5ce64
2 changed files with 10 additions and 3 deletions

View File

@@ -1145,7 +1145,7 @@ void cEntity::BroadcastMovementUpdate(const cClientHandle * a_Exclude)
int DiffY = (int)(floor(GetPosY() * 32.0) - floor(m_LastPos.y * 32.0));
int DiffZ = (int)(floor(GetPosZ() * 32.0) - floor(m_LastPos.z * 32.0));
if ((abs(DiffX) >= 4) || (abs(DiffY) >= 4) || (abs(DiffZ) >= 4))
if ((abs(DiffX) != 0) || (abs(DiffY) != 0) || (abs(DiffZ) != 0)) // Have we moved?
{
if ((abs(DiffX) <= 127) && (abs(DiffY) <= 127) && (abs(DiffZ) <= 127)) // Limitations of a Byte
{