diff options
author | Mattes D <github@xoft.cz> | 2017-01-19 22:45:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-19 22:45:23 +0100 |
commit | 97980d11038e57faa905a27977545fb77ff2c5bd (patch) | |
tree | 05bfd2f22ce126644594e00a02cfb30cede35153 /src/World.cpp | |
parent | World: Removed LineBlockTracer test code. (#3555) (diff) | |
download | cuberite-97980d11038e57faa905a27977545fb77ff2c5bd.tar cuberite-97980d11038e57faa905a27977545fb77ff2c5bd.tar.gz cuberite-97980d11038e57faa905a27977545fb77ff2c5bd.tar.bz2 cuberite-97980d11038e57faa905a27977545fb77ff2c5bd.tar.lz cuberite-97980d11038e57faa905a27977545fb77ff2c5bd.tar.xz cuberite-97980d11038e57faa905a27977545fb77ff2c5bd.tar.zst cuberite-97980d11038e57faa905a27977545fb77ff2c5bd.zip |
Diffstat (limited to '')
-rw-r--r-- | src/World.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp index 1866d4eaf..599bd1d6f 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -471,6 +471,8 @@ void cWorld::Start(cDeadlockDetect & a_DeadlockDetect) int GameMode = IniFile.GetValueSetI("General", "Gamemode", static_cast<int>(m_GameMode)); int Weather = IniFile.GetValueSetI("General", "Weather", static_cast<int>(m_Weather)); + m_WorldAge = std::chrono::milliseconds(IniFile.GetValueSetI("General", "WorldAgeMS", 0LL)); + // Load the weather frequency data: if (m_Dimension == dimOverworld) { @@ -937,6 +939,7 @@ void cWorld::Stop(cDeadlockDetect & a_DeadlockDetect) IniFile.SetValueB("General", "IsDaylightCycleEnabled", m_IsDaylightCycleEnabled); IniFile.SetValueI("General", "Weather", static_cast<int>(m_Weather)); IniFile.SetValueI("General", "TimeInTicks", GetTimeOfDay()); + IniFile.SetValueI("General", "WorldAgeMS", static_cast<Int64>(m_WorldAge.count())); IniFile.WriteFile(m_IniFileName); m_TickThread.Stop(); |