Core/Movement: Ensured object orientation is always within 0-2pi range, this fixes movement.
This commit is contained in:
@@ -16257,20 +16257,20 @@ void Unit::SendMoveRoot(uint32 value)
|
||||
data.WriteBit(guid[4]);
|
||||
data.WriteBit(guid[1]);
|
||||
data.WriteBit(guid[3]);
|
||||
|
||||
|
||||
data.WriteByteSeq(guid[1]);
|
||||
data.WriteByteSeq(guid[0]);
|
||||
data.WriteByteSeq(guid[2]);
|
||||
data.WriteByteSeq(guid[5]);
|
||||
|
||||
|
||||
data << uint32(value);
|
||||
|
||||
|
||||
|
||||
|
||||
data.WriteByteSeq(guid[3]);
|
||||
data.WriteByteSeq(guid[4]);
|
||||
data.WriteByteSeq(guid[7]);
|
||||
data.WriteByteSeq(guid[6]);
|
||||
|
||||
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
@@ -16286,19 +16286,19 @@ void Unit::SendMoveUnroot(uint32 value)
|
||||
data.WriteBit(guid[2]);
|
||||
data.WriteBit(guid[4]);
|
||||
data.WriteBit(guid[6]);
|
||||
|
||||
|
||||
data.WriteByteSeq(guid[3]);
|
||||
data.WriteByteSeq(guid[6]);
|
||||
data.WriteByteSeq(guid[1]);
|
||||
|
||||
|
||||
data << uint32(value);
|
||||
|
||||
|
||||
data.WriteByteSeq(guid[2]);
|
||||
data.WriteByteSeq(guid[0]);
|
||||
data.WriteByteSeq(guid[7]);
|
||||
data.WriteByteSeq(guid[4]);
|
||||
data.WriteByteSeq(guid[5]);
|
||||
|
||||
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
@@ -17849,6 +17849,7 @@ bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool tel
|
||||
return false;
|
||||
}
|
||||
|
||||
orientation = MapManager::NormalizeOrientation(orientation);
|
||||
bool turn = (GetOrientation() != orientation);
|
||||
bool relocated = (teleport || GetPositionX() != x || GetPositionY() != y || GetPositionZ() != z);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user