Fix dying of lava causes repeated death This is a bugfix for issue #81
authorgregorycu <gregory.currie@gmail.com>
Mon, 2 Feb 2015 14:26:03 +0000 (01:26 +1100)
committerCraig Robbins <kde.psych@gmail.com>
Thu, 5 Feb 2015 07:32:35 +0000 (17:32 +1000)
src/environment.cpp

index ee4488476455293e06d41296b4c925e31034324e..e1f79803b22de3878aeea71499a9cd9ca7b7afea 100644 (file)
@@ -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