aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-04 03:56:22 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-04 03:56:22 +0200
commitbc5cc638fc510f55237d51eb031fa5f18b3f7a04 (patch)
tree0ddb880a766406f26ddf8493c4c97b9118cbee04
parentbff8be8b766de227d4bf25f162f857750a8fbd76 (diff)
downloadminetest-bc5cc638fc510f55237d51eb031fa5f18b3f7a04.tar.gz
minetest-bc5cc638fc510f55237d51eb031fa5f18b3f7a04.tar.bz2
minetest-bc5cc638fc510f55237d51eb031fa5f18b3f7a04.zip
Fix player not dying when beated to death by other player
-rw-r--r--src/server.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/server.cpp b/src/server.cpp
index e33a675c4..8fbc0f793 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -4307,13 +4307,12 @@ void Server::HandlePlayerHP(Player *player, s16 damage)
if(srp->m_respawn_active)
return;
- if(damage == 0)
- return;
-
if(player->hp > damage)
{
- player->hp -= damage;
- SendPlayerHP(player);
+ if(damage != 0){
+ player->hp -= damage;
+ SendPlayerHP(player);
+ }
return;
}