diff --git a/source/server/world/save/WorldSaveBasicBackend.cpp b/source/server/world/save/WorldSaveBasicBackend.cpp index 12e77c2c..878b8cce 100644 --- a/source/server/world/save/WorldSaveBasicBackend.cpp +++ b/source/server/world/save/WorldSaveBasicBackend.cpp @@ -31,6 +31,7 @@ #include #include "ComponentType.hpp" +#include "GameTime.hpp" #include "Network.hpp" #include "NetworkComponent.hpp" #include "Registry.hpp" @@ -112,6 +113,10 @@ void WorldSaveBasicBackend::load(const std::string &name) { auto &player = m_playerList.addPlayer(username, false); player.deserialize(save); } + + sf::Uint64 ticks; + save >> ticks; + GameTime::setTicks(ticks); } // gkInfo() << "Loading done."; @@ -168,6 +173,8 @@ void WorldSaveBasicBackend::save(const std::string &name) { save << it.second; } + save << (sf::Uint64)GameTime::getTicks(); + file.write((const char *)save.getData(), save.getDataSize()); // gkInfo() << "Saving done.";