summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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);