diff options
author | Masy98 <masy@antheruscraft.de> | 2014-09-06 22:06:40 +0200 |
---|---|---|
committer | Masy98 <masy@antheruscraft.de> | 2014-09-06 22:06:40 +0200 |
commit | 9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa (patch) | |
tree | 500cd7ff84cbf42e34eb95225e83c3f18c4258c0 /src/Entities/Player.cpp | |
parent | Fixed typo! (diff) | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
download | cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.gz cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.bz2 cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.lz cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.xz cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.zst cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.zip |
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r-- | src/Entities/Player.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 756410989..b0da6965a 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1670,7 +1670,11 @@ bool cPlayer::LoadFromFile(const AString & a_FileName, cWorldPtr & a_World) cEnderChestEntity::LoadFromJson(root["enderchestinventory"], m_EnderChestContents); m_LoadedWorldName = root.get("world", "world").asString(); - a_World = cRoot::Get()->GetWorld(GetLoadedWorldName(), true); + a_World = cRoot::Get()->GetWorld(GetLoadedWorldName(), false); + if (a_World == NULL) + { + a_World = cRoot::Get()->GetDefaultWorld(); + } m_LastBedPos.x = root.get("SpawnX", a_World->GetSpawnX()).asInt(); m_LastBedPos.y = root.get("SpawnY", a_World->GetSpawnY()).asInt(); |