diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-11 18:15:34 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-11 18:15:34 +0100 |
commit | d2573b84dd52c06c723953ef66da4af8937a5a53 (patch) | |
tree | 32b2fcc9ccfb727fe339f5cb675cbbb50298238c /source/World.cpp | |
parent | Fixed a crash in LeakFinder when out of memory (diff) | |
download | cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar.gz cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar.bz2 cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar.lz cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar.xz cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar.zst cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.zip |
Diffstat (limited to '')
-rw-r--r-- | source/World.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/World.cpp b/source/World.cpp index 6ff9395c1..70b70d1f1 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -201,6 +201,22 @@ cWorld::cWorld(const AString & a_WorldName) : cIniFile IniFile(m_IniFileName); IniFile.ReadFile(); + m_Dimension = (eDimension)(IniFile.GetValueSetI("General", "Dimension", 0)); + switch (m_Dimension) + { + case dimNether: + case dimOverworld: + case dimEnd: + { + break; + } + default: + { + LOGWARNING("Unknown dimension: %d. Setting to Overworld (0)", m_Dimension); + m_Dimension = dimOverworld; + break; + } + } // switch (m_Dimension) m_SpawnX = IniFile.GetValueSetF("SpawnPosition", "X", m_SpawnX); m_SpawnY = IniFile.GetValueSetF("SpawnPosition", "Y", m_SpawnY); m_SpawnZ = IniFile.GetValueSetF("SpawnPosition", "Z", m_SpawnZ); |