aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregorycu <gregory.currie@gmail.com>2015-02-03 01:26:03 +1100
committerCraig Robbins <kde.psych@gmail.com>2015-02-05 17:32:35 +1000
commit5e075c3344911176421be3ae08e2bdc432a83b8f (patch)
tree3f36b70798dc9f3a47bdcdc75bb24abae3ce6237
parentb56f1175a2d3661459143e7c4104c43bf5a9caa5 (diff)
downloadminetest-5e075c3344911176421be3ae08e2bdc432a83b8f.tar.gz
minetest-5e075c3344911176421be3ae08e2bdc432a83b8f.tar.bz2
minetest-5e075c3344911176421be3ae08e2bdc432a83b8f.zip
Fix dying of lava causes repeated death This is a bugfix for issue #81
-rw-r--r--src/environment.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index ee4488476..e1f79803b 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -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