1
0

Removed extraneous switch{} in Start()

Squashed a warning.
This commit is contained in:
archshift 2014-04-25 16:26:24 -07:00
parent 5ffdaa8142
commit 083cec5a09
2 changed files with 3 additions and 17 deletions

View File

@ -324,7 +324,7 @@ eDimension StringToDimension(const AString & a_DimensionString)
{ dimOverworld, "Normal"}, { dimOverworld, "Normal"},
{ dimOverworld, "World"}, { dimOverworld, "World"},
{ dimNether, "Nether"}, { dimNether, "Nether"},
{ dimNether, "Hell"}, // Alternate name for End { dimNether, "Hell"}, // Alternate name for Nether
{ dimEnd, "End"}, { dimEnd, "End"},
{ dimEnd, "Sky"}, // Old name for End { dimEnd, "Sky"}, // Old name for End
} ; } ;
@ -337,7 +337,8 @@ eDimension StringToDimension(const AString & a_DimensionString)
} // for i - DimensionMap[] } // for i - DimensionMap[]
// Not found // Not found
return (eDimension)-1000; LOGWARNING("Unknown dimension: \"%s\". Setting to Overworld", a_DimensionString.c_str());
return dimOverworld;
} }

View File

@ -518,21 +518,6 @@ void cWorld::Start(void)
} }
AString Dimension = IniFile.GetValueSet("General", "Dimension", "Overworld"); AString Dimension = IniFile.GetValueSet("General", "Dimension", "Overworld");
m_Dimension = StringToDimension(Dimension); m_Dimension = StringToDimension(Dimension);
switch (m_Dimension)
{
case dimNether:
case dimOverworld:
case dimEnd:
{
break;
}
default:
{
LOGWARNING("Unknown dimension: \"%s\". Setting to Overworld", Dimension.c_str());
m_Dimension = dimOverworld;
break;
}
} // switch (m_Dimension)
// Try to find the "SpawnPosition" key and coord values in the world configuration, set the flag if found // Try to find the "SpawnPosition" key and coord values in the world configuration, set the flag if found
int KeyNum = IniFile.FindKey("SpawnPosition"); int KeyNum = IniFile.FindKey("SpawnPosition");