Skip to content

Commit

Permalink
Fix dying of lava causes repeated death This is a bugfix for issue #81
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorycu authored and Zeno- committed Feb 5, 2015
1 parent b56f117 commit 5e075c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/environment.cpp
Expand Up @@ -2567,6 +2567,8 @@ void ClientEnvironment::damageLocalPlayer(u8 damage, bool handle_hp)
assert(lplayer);

if(handle_hp){
if (lplayer->hp == 0) // Don't damage a dead player
return;
if(lplayer->hp > damage)
lplayer->hp -= damage;
else
Expand Down

0 comments on commit 5e075c3

Please sign in to comment.