summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp
index f83de0342..49d42f08e 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -12,6 +12,7 @@
#include "ChunkMap.h"
#include "Generating/ChunkDesc.h"
#include "OSSupport/Timer.h"
+#include "WorldStorage/ScoreboardSerializer.h"
// Entities (except mobs):
#include "Entities/ExpOrb.h"
@@ -248,6 +249,10 @@ cWorld::cWorld(const AString & a_WorldName) :
LOGD("cWorld::cWorld(\"%s\")", a_WorldName.c_str());
cFile::CreateFolder(FILE_IO_PREFIX + m_WorldName);
+
+ // Load the scoreboard
+ cScoreboardSerializer Serializer(m_WorldName, &m_Scoreboard);
+ Serializer.Load();
}
@@ -267,6 +272,10 @@ cWorld::~cWorld()
m_Storage.WaitForFinish();
+ // Unload the scoreboard
+ cScoreboardSerializer Serializer(m_WorldName, &m_Scoreboard);
+ Serializer.Save();
+
delete m_ChunkMap;
}