Ensure that all actions are compared to fixed point in time (ie. world update start)
Port From (https://github.com/TrinityCore/TrinityCore/commit/60663d1374beef3103f4787152654034fa4a8897)
This commit is contained in:
@@ -87,7 +87,7 @@ namespace Game
|
||||
{
|
||||
if (_initialized)
|
||||
{
|
||||
uint currentTimestamp = Time.GetMSTime();
|
||||
uint currentTimestamp = GameTime.GetGameTimeMS();
|
||||
uint diff = currentTimestamp - _previousTimestamp;
|
||||
_previousTimestamp = currentTimestamp;
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace Game
|
||||
|
||||
_initialized = true;
|
||||
|
||||
_previousTimestamp = Time.GetMSTime();
|
||||
_previousTimestamp = GameTime.GetGameTimeMS();
|
||||
}
|
||||
|
||||
public override void RequestData()
|
||||
@@ -162,7 +162,7 @@ namespace Game
|
||||
if (_otherChecksTodo.Empty())
|
||||
_otherChecksTodo.AddRange(Global.WardenCheckMgr.OtherChecksIdPool);
|
||||
|
||||
_serverTicks = Time.GetMSTime();
|
||||
_serverTicks = GameTime.GetGameTimeMS();
|
||||
|
||||
ushort id;
|
||||
WardenCheckType type;
|
||||
@@ -323,7 +323,7 @@ namespace Game
|
||||
|
||||
uint newClientTicks = buff.ReadUInt32();
|
||||
|
||||
uint ticksNow = Time.GetMSTime();
|
||||
uint ticksNow = GameTime.GetGameTimeMS();
|
||||
uint ourTicks = newClientTicks + (ticksNow - _serverTicks);
|
||||
|
||||
Log.outDebug(LogFilter.Warden, "ServerTicks {0}", ticksNow); // Now
|
||||
|
||||
Reference in New Issue
Block a user