diff options
| author | xinef1 <w.szyszko2@gmail.com> | 2017-03-02 02:19:25 +0100 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2017-03-01 22:19:25 -0300 |
| commit | 7567cafec84080d26ea513242a1f540a823b8f9d (patch) | |
| tree | f6f37a7cc4d06db0dbb0e08a01f8a18cf47ac955 /src/server/scripts/Commands | |
| parent | 7011aabb56f061fc889ec42ce32b7605ceb35b53 (diff) | |
Ensure that all actions are compared to fixed point in time (ie. world update start) (#18910)
- Actions will not be dependent on processing moment
- Increased GameObjects cooldown resolution to milliseconds, fixes arming time of traps to be exactly one second and not something from range (1000, 1999)
- Created GameTime namespace and UpdateTime class and moved there some code out of world
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_server.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index 285ac4e3e96..50b9b37031f 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -30,6 +30,8 @@ EndScriptData */ #include "ScriptMgr.h" #include "GitRevision.h" #include "Util.h" +#include "GameTime.h" +#include "UpdateTime.h" class server_commandscript : public CommandScript { @@ -108,8 +110,8 @@ public: uint32 queuedClientsNum = sWorld->GetQueuedSessionCount(); uint32 maxActiveClientsNum = sWorld->GetMaxActiveSessionCount(); uint32 maxQueuedClientsNum = sWorld->GetMaxQueuedSessionCount(); - std::string uptime = secsToTimeString(sWorld->GetUptime()); - uint32 updateTime = sWorld->GetUpdateTime(); + std::string uptime = secsToTimeString(GameTime::GetUptime()); + uint32 updateTime = sWorldUpdateTime.GetLastUpdateTime(); handler->SendSysMessage(GitRevision::GetFullVersion()); handler->PSendSysMessage(LANG_CONNECTED_PLAYERS, playersNum, maxPlayersNum); @@ -304,7 +306,7 @@ public: if (newTime < 0) return false; - sWorld->SetRecordDiffInterval(newTime); + sWorldUpdateTime.SetRecordUpdateTimeInterval(newTime); printf("Record diff every %i ms\n", newTime); return true; |
