summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2017-03-19 15:11:24 +0100
committerGitHub <noreply@github.com>2017-03-19 15:11:24 +0100
commit836c9cf039d001f6822a3d39ac632e2c809ff5a3 (patch)
tree7198344ae7576bcb6683d61fb8e1ea22e6665715 /src
parentMerge pull request #3629 from Seadragon91/patch-1 (diff)
parentDetach player from entity / object if he is dead (diff)
downloadcuberite-836c9cf039d001f6822a3d39ac632e2c809ff5a3.tar
cuberite-836c9cf039d001f6822a3d39ac632e2c809ff5a3.tar.gz
cuberite-836c9cf039d001f6822a3d39ac632e2c809ff5a3.tar.bz2
cuberite-836c9cf039d001f6822a3d39ac632e2c809ff5a3.tar.lz
cuberite-836c9cf039d001f6822a3d39ac632e2c809ff5a3.tar.xz
cuberite-836c9cf039d001f6822a3d39ac632e2c809ff5a3.tar.zst
cuberite-836c9cf039d001f6822a3d39ac632e2c809ff5a3.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 521a12326..7fa17f0f5 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1042,6 +1042,10 @@ void cPlayer::KilledBy(TakeDamageInfo & a_TDI)
m_bVisible = false; // So new clients don't see the player
+ // Detach player from object / entity. If the player dies, the server still says
+ // that the player is attached to the entity / object
+ Detach();
+
// Puke out all the items
cItems Pickups;
m_Inventory.CopyToItems(Pickups);