Merge pull request #3633 from cuberite/player_detach
Detach player from entity / object if he is dead
This commit is contained in:
commit
836c9cf039
@ -1042,6 +1042,10 @@ void cPlayer::KilledBy(TakeDamageInfo & a_TDI)
|
|||||||
|
|
||||||
m_bVisible = false; // So new clients don't see the player
|
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
|
// Puke out all the items
|
||||||
cItems Pickups;
|
cItems Pickups;
|
||||||
m_Inventory.CopyToItems(Pickups);
|
m_Inventory.CopyToItems(Pickups);
|
||||||
|
Loading…
Reference in New Issue
Block a user