feat(Core/Time): Implement saparated manager for game time (#8630)

This commit is contained in:
Kargatum
2022-01-24 17:55:00 +07:00
committed by GitHub
parent 12da792a90
commit 8b7df23f06
129 changed files with 1147 additions and 817 deletions
+3 -2
View File
@@ -19,6 +19,7 @@
#include "ByteBuffer.h"
#include "Common.h"
#include "CryptoRandom.h"
#include "GameTime.h"
#include "HMAC.h"
#include "Log.h"
#include "Opcodes.h"
@@ -255,7 +256,7 @@ void WardenWin::RequestChecks()
_ChecksTodo[i].assign(sWardenCheckMgr->CheckIdPool[i].begin(), sWardenCheckMgr->CheckIdPool[i].end());
}
_serverTicks = World::GetGameTimeMS();
_serverTicks = GameTime::GetGameTimeMS().count();
_CurrentChecks.clear();
// No pending checks
@@ -493,7 +494,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
uint32 newClientTicks;
buff >> newClientTicks;
uint32 ticksNow = World::GetGameTimeMS();
uint32 ticksNow = GameTime::GetGameTimeMS().count();
uint32 ourTicks = newClientTicks + (ticksNow - _serverTicks);
LOG_DEBUG("warden", "ServerTicks %u", ticksNow); // Now