Improve jerky player movement on high latency

- On CMSG_PING we already know the latency from client.
This commit is contained in:
H0zen 2016-02-03 02:36:30 +02:00
parent f78f1e612a
commit f7fe9a119a

View File

@ -529,11 +529,12 @@ bool WorldSession::VerifyMovementInfo(MovementInfo const& movementInfo) const
void WorldSession::HandleMoverRelocation(MovementInfo& movementInfo)
{
uint32 mstime = WorldTimer::getMSTime();
if (m_clientTimeDelay == 0)
m_clientTimeDelay = mstime - movementInfo.GetTime();
//uint32 mstime = WorldTimer::getMSTime();
//if (m_clientTimeDelay == 0)
// m_clientTimeDelay = mstime - movementInfo.GetTime();
movementInfo.UpdateTime(movementInfo.GetTime() + m_clientTimeDelay + MOVEMENT_PACKET_TIME_DELAY);
//movementInfo.UpdateTime(movementInfo.GetTime() + m_clientTimeDelay + MOVEMENT_PACKET_TIME_DELAY);
movementInfo.UpdateTime(movementInfo.GetTime() + GetLatency());
Unit* mover = _player->GetMover();