1
0
Fork 0

Detach player from entity / object if he is dead

This commit is contained in:
Lukas Pioch 2017-03-19 09:48:15 +01:00
parent 2b46a32a21
commit 74ee255cae
1 changed files with 4 additions and 0 deletions

View File

@ -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);