1
0

Removed reading default values from settings.ini for worlds.

This commit is contained in:
Samuel Barney 2013-10-14 15:32:40 -06:00
parent 210cd4eb50
commit 02baff6629

View File

@ -444,12 +444,6 @@ void cWorld::Start(void)
m_SpawnY = cChunkDef::Height;
m_SpawnZ = (double)((m_TickRand.randInt() % 1000) - 500);
m_GameMode = eGameMode_Creative;
static AString SettingsName = "settings.ini";
cIniFile Settings(SettingsName);
if (!Settings.ReadFile())
{
LOGWARNING("Cannot read world settings from \"%s\", defaults will be used.", SettingsName.c_str());
}
cIniFile IniFile(m_IniFileName);
if (!IniFile.ReadFile())
@ -495,11 +489,8 @@ void cWorld::Start(void)
m_GameMode = (eGameMode)IniFile.GetValueSetI("GameMode", "GameMode", m_GameMode);
m_bAnimals = Settings.GetValueB("Monsters", "AnimalsOn", true);
m_bAnimals = IniFile.GetValueB("Monsters", "AnimalsOn", m_bAnimals);
m_bAnimals = IniFile.GetValueB("Monsters", "AnimalsOn", true);
AString sAllMonsters = IniFile.GetValue("Monsters", "Types");
if (!sAllMonsters.size())
sAllMonsters = Settings.GetValue("Monsters", "Types");
AStringVector SplitList = StringSplit(sAllMonsters, ",");
for (unsigned int i = 0; i < SplitList.size(); ++i)
{