1
0

Fixed an assert in map-loading.

The maps were loaded too soon, the world wasn't initialized yet.
This commit is contained in:
madmaxoft 2014-03-04 18:40:55 +01:00
parent 442c1d96fc
commit e50ffba1ad

View File

@ -264,8 +264,6 @@ cWorld::cWorld(const AString & a_WorldName) :
// Load the scoreboard // Load the scoreboard
cScoreboardSerializer Serializer(m_WorldName, &m_Scoreboard); cScoreboardSerializer Serializer(m_WorldName, &m_Scoreboard);
Serializer.Load(); Serializer.Load();
m_MapManager.LoadMapData();
} }
@ -652,13 +650,13 @@ void cWorld::Start(void)
m_LastSpawnMonster.insert(std::map<cMonster::eFamily, Int64>::value_type(cMonster::mfAmbient, 0)); m_LastSpawnMonster.insert(std::map<cMonster::eFamily, Int64>::value_type(cMonster::mfAmbient, 0));
m_LastSpawnMonster.insert(std::map<cMonster::eFamily, Int64>::value_type(cMonster::mfWater, 0)); m_LastSpawnMonster.insert(std::map<cMonster::eFamily, Int64>::value_type(cMonster::mfWater, 0));
m_MapManager.LoadMapData();
// Save any changes that the defaults may have done to the ini file: // Save any changes that the defaults may have done to the ini file:
if (!IniFile.WriteFile(m_IniFileName)) if (!IniFile.WriteFile(m_IniFileName))
{ {
LOGWARNING("Could not write world config to %s", m_IniFileName.c_str()); LOGWARNING("Could not write world config to %s", m_IniFileName.c_str());
} }
} }