Ensure that all actions are compared to fixed point in time (ie. world update start)
This commit is contained in:
1 parent
00babf222a
commit
adae2fec26
43 files changed
+479
-185
No files matched your search
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user