diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-09 01:55:21 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-09 01:55:21 +0200 |
commit | 6fb0a76b1eab47a806723b0a856609e19c5c14f9 (patch) | |
tree | c6d8712bdc4167e51d030277b28256c9bb0efe7c /src/Entities | |
parent | PlayerSpawn packet: Send the correct uuid. (diff) | |
parent | capitalisation error (diff) | |
download | cuberite-6fb0a76b1eab47a806723b0a856609e19c5c14f9.tar cuberite-6fb0a76b1eab47a806723b0a856609e19c5c14f9.tar.gz cuberite-6fb0a76b1eab47a806723b0a856609e19c5c14f9.tar.bz2 cuberite-6fb0a76b1eab47a806723b0a856609e19c5c14f9.tar.lz cuberite-6fb0a76b1eab47a806723b0a856609e19c5c14f9.tar.xz cuberite-6fb0a76b1eab47a806723b0a856609e19c5c14f9.tar.zst cuberite-6fb0a76b1eab47a806723b0a856609e19c5c14f9.zip |
Diffstat (limited to '')
-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(); |