1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Preserve immortal group for players when damage is disabled

This commit is contained in:
sfan5 2021-01-30 12:41:27 +01:00
parent fd1c1a755e
commit a01a02f7a1
4 changed files with 14 additions and 4 deletions

View file

@ -1349,7 +1349,7 @@ void Server::SendPlayerHPOrDie(PlayerSAO *playersao, const PlayerHPChangeReason
return;
session_t peer_id = playersao->getPeerID();
bool is_alive = playersao->getHP() > 0;
bool is_alive = !playersao->isDead();
if (is_alive)
SendPlayerHP(peer_id);