summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-08 10:57:42 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-08 10:57:42 +0100
commit8fd2cb5db2498e4618472322706c1fdaea6b03bb (patch)
tree46b27425e0aeecd1ce13cc7d5832921abf435d4d /src/World.cpp
parentMerge pull request #2969 from LogicParrot/ini (diff)
parentProper world linkages and dimension types for newly created world.ini's (diff)
downloadcuberite-8fd2cb5db2498e4618472322706c1fdaea6b03bb.tar
cuberite-8fd2cb5db2498e4618472322706c1fdaea6b03bb.tar.gz
cuberite-8fd2cb5db2498e4618472322706c1fdaea6b03bb.tar.bz2
cuberite-8fd2cb5db2498e4618472322706c1fdaea6b03bb.tar.lz
cuberite-8fd2cb5db2498e4618472322706c1fdaea6b03bb.tar.xz
cuberite-8fd2cb5db2498e4618472322706c1fdaea6b03bb.tar.zst
cuberite-8fd2cb5db2498e4618472322706c1fdaea6b03bb.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 127621069..fa9b7f966 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -512,8 +512,18 @@ void cWorld::Start(void)
if (GetDimension() == dimOverworld)
{
- m_LinkedNetherWorldName = IniFile.GetValueSet("LinkedWorlds", "NetherWorldName", GetName() + "_nether");
- m_LinkedEndWorldName = IniFile.GetValueSet("LinkedWorlds", "EndWorldName", GetName() + "_end");
+ AString MyNetherName = GetName() + "_nether";
+ AString MyEndName = GetName() + "_end";
+ if (cRoot::Get()->GetWorld(MyNetherName) == nullptr)
+ {
+ MyNetherName = "";
+ }
+ if (cRoot::Get()->GetWorld(MyEndName) == nullptr)
+ {
+ MyEndName = "";
+ }
+ m_LinkedNetherWorldName = IniFile.GetValueSet("LinkedWorlds", "NetherWorldName", MyNetherName);
+ m_LinkedEndWorldName = IniFile.GetValueSet("LinkedWorlds", "EndWorldName", MyEndName);
}
else
{