mirror of
https://github.com/minetest/minetest.git
synced 2025-06-30 23:20:22 +02:00
handleCommand_Breath mustn't update breath is player is dead. A dead player doesn't breath.
Add Player::isDead function to check player is dead
This commit is contained in:
@ -916,6 +916,15 @@ void Server::handleCommand_Breath(NetworkPacket* pkt)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If player is dead, we don't need to update the breath
|
||||
* He is dead !
|
||||
*/
|
||||
if (player->isDead()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
PlayerSAO *playersao = player->getPlayerSAO();
|
||||
if (playersao == NULL) {
|
||||
errorstream << "Server::ProcessData(): Cancelling: "
|
||||
|
Reference in New Issue
Block a user