mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Fix dying of lava causes repeated death This is a bugfix for issue #81
This commit is contained in:
parent
b56f1175a2
commit
5e075c3344
1 changed files with 2 additions and 0 deletions
|
@ -2567,6 +2567,8 @@ void ClientEnvironment::damageLocalPlayer(u8 damage, bool handle_hp)
|
||||||
assert(lplayer);
|
assert(lplayer);
|
||||||
|
|
||||||
if(handle_hp){
|
if(handle_hp){
|
||||||
|
if (lplayer->hp == 0) // Don't damage a dead player
|
||||||
|
return;
|
||||||
if(lplayer->hp > damage)
|
if(lplayer->hp > damage)
|
||||||
lplayer->hp -= damage;
|
lplayer->hp -= damage;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue