summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-04 11:32:17 +0200
committerMattes D <github@xoft.cz>2015-04-04 11:32:17 +0200
commite42e46d5f9e950e0f6c00f61f8616abdc3db9b2b (patch)
tree1fcb724a21b7e98cf99ef54b29a7fec6e4aa4b5e /src/Entities/Player.cpp
parentFixed the nether and end getting snow if they were generated in the overworld. (diff)
parentFixed players not appearing/disappearing when traveling to a new world. (diff)
downloadcuberite-e42e46d5f9e950e0f6c00f61f8616abdc3db9b2b.tar
cuberite-e42e46d5f9e950e0f6c00f61f8616abdc3db9b2b.tar.gz
cuberite-e42e46d5f9e950e0f6c00f61f8616abdc3db9b2b.tar.bz2
cuberite-e42e46d5f9e950e0f6c00f61f8616abdc3db9b2b.tar.lz
cuberite-e42e46d5f9e950e0f6c00f61f8616abdc3db9b2b.tar.xz
cuberite-e42e46d5f9e950e0f6c00f61f8616abdc3db9b2b.tar.zst
cuberite-e42e46d5f9e950e0f6c00f61f8616abdc3db9b2b.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index c89e7b87c..2549a8481 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1603,6 +1603,9 @@ bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn)
m_ClientHandle->SendRespawn(a_World->GetDimension());
}
+ // Broadcast for other people that the player is gone.
+ GetWorld()->BroadcastDestroyEntity(*this);
+
// Remove player from the old world
SetWorldTravellingFrom(GetWorld()); // cChunk handles entity removal
GetWorld()->RemovePlayer(this, false);
@@ -1619,6 +1622,9 @@ bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn)
{
m_ClientHandle->SendWeather(a_World->GetWeather());
}
+
+ // Broadcast the player into the new world.
+ a_World->BroadcastSpawnEntity(*this);
return true;
}