summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-03-05 20:33:43 +0100
committerGitHub <noreply@github.com>2020-03-05 20:33:43 +0100
commit83a41c93e9dede8c187cf841d5618c27e145d2a3 (patch)
tree353e7ab9ffba3086775e9f5248b68f8f6d73f484 /src/Entities/Player.cpp
parentDon't spawn boats in ground (diff)
downloadcuberite-83a41c93e9dede8c187cf841d5618c27e145d2a3.tar
cuberite-83a41c93e9dede8c187cf841d5618c27e145d2a3.tar.gz
cuberite-83a41c93e9dede8c187cf841d5618c27e145d2a3.tar.bz2
cuberite-83a41c93e9dede8c187cf841d5618c27e145d2a3.tar.lz
cuberite-83a41c93e9dede8c187cf841d5618c27e145d2a3.tar.xz
cuberite-83a41c93e9dede8c187cf841d5618c27e145d2a3.tar.zst
cuberite-83a41c93e9dede8c187cf841d5618c27e145d2a3.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 421eddbd5..07342bd52 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2029,6 +2029,9 @@ void cPlayer::DoMoveToWorld(const cEntity::sWorldChangeInfo & a_WorldChangeInfo)
// Stop all mobs from targeting this player
StopEveryoneFromTargetingMe();
+ // If player is attached to entity, detach, to prevent client side effects
+ Detach();
+
// Prevent further ticking in this world
SetIsTicking(false);