mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 13:47:23 +01:00
Ensure that all actions are compared to fixed point in time (ie. world update start)
This commit is contained in:
@@ -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