mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix player not dying when beated to death by other player
This commit is contained in:
parent
bff8be8b76
commit
bc5cc638fc
1 changed files with 4 additions and 5 deletions
|
@ -4307,13 +4307,12 @@ void Server::HandlePlayerHP(Player *player, s16 damage)
|
||||||
if(srp->m_respawn_active)
|
if(srp->m_respawn_active)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(damage == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(player->hp > damage)
|
if(player->hp > damage)
|
||||||
{
|
{
|
||||||
player->hp -= damage;
|
if(damage != 0){
|
||||||
SendPlayerHP(player);
|
player->hp -= damage;
|
||||||
|
SendPlayerHP(player);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue