1
0

cWorld now saves/loads the scoreboard

This commit is contained in:
andrew
2014-01-22 15:49:21 +02:00
parent 9bd8f74b59
commit dd04f5a73c
4 changed files with 44 additions and 15 deletions

View File

@@ -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;
}