Ensure that all actions are compared to fixed point in time (ie. world update start)

This commit is contained in:
Aokromes
2017-04-14 15:02:49 +02:00
parent 00babf222a
commit adae2fec26
43 changed files with 479 additions and 185 deletions

View File

@@ -23,6 +23,7 @@
#include "Opcodes.h"
#include "Log.h"
#include "Player.h"
#include "GameTime.h"
#include "GossipDef.h"
#include "World.h"
#include "ObjectMgr.h"
@@ -1371,7 +1372,7 @@ void WorldSession::HandleTimeSyncResp(WorldPacket& recvData)
TC_LOG_DEBUG("network", "Time sync received: counter %u, client ticks %u, time since last sync %u", counter, clientTicks, clientTicks - _player->m_timeSyncClient);
uint32 ourTicks = clientTicks + (getMSTime() - _player->m_timeSyncServer);
uint32 ourTicks = clientTicks + (GameTime::GetGameTimeMS() - _player->m_timeSyncServer);
// diff should be small
TC_LOG_DEBUG("network", "Our ticks: %u, diff %u, latency %u", ourTicks, ourTicks - clientTicks, GetLatency());