summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2017-03-19 09:48:15 +0100
committerLukas Pioch <lukas@zgow.de>2017-03-19 09:48:15 +0100
commit74ee255cae9d0ac9e383861e29d225c5b5c9d878 (patch)
tree7198344ae7576bcb6683d61fb8e1ea22e6665715 /src/Entities
parentMerge pull request #3629 from Seadragon91/patch-1 (diff)
downloadcuberite-74ee255cae9d0ac9e383861e29d225c5b5c9d878.tar
cuberite-74ee255cae9d0ac9e383861e29d225c5b5c9d878.tar.gz
cuberite-74ee255cae9d0ac9e383861e29d225c5b5c9d878.tar.bz2
cuberite-74ee255cae9d0ac9e383861e29d225c5b5c9d878.tar.lz
cuberite-74ee255cae9d0ac9e383861e29d225c5b5c9d878.tar.xz
cuberite-74ee255cae9d0ac9e383861e29d225c5b5c9d878.tar.zst
cuberite-74ee255cae9d0ac9e383861e29d225c5b5c9d878.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);