1
0

Speed improvements, crash fixes, & self-suggestions

This commit is contained in:
Tiger Wang
2014-07-22 17:26:48 +01:00
parent 0a15e1f420
commit a28b0dc120
8 changed files with 55 additions and 61 deletions

View File

@@ -314,10 +314,12 @@ void cRoot::LoadWorlds(cIniFile & IniFile)
cWorld * cRoot::CreateAndInitializeWorld(const AString & a_WorldName, eDimension a_Dimension, const AString & a_OverworldName)
{
if (m_WorldsByName[a_WorldName] != NULL)
cWorld * World = m_WorldsByName[a_WorldName];
if (World != NULL)
{
return NULL;
return World;
}
cWorld * NewWorld = new cWorld(a_WorldName.c_str(), a_Dimension, a_OverworldName);
m_WorldsByName[a_WorldName] = NewWorld;
NewWorld->Start();