From: Perttu Ahola Date: Sun, 4 Dec 2011 01:56:22 +0000 (+0200) Subject: Fix player not dying when beated to death by other player X-Git-Tag: 0.4.dev-20111209-1~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bc5cc638fc510f55237d51eb031fa5f18b3f7a04;p=oweals%2Fminetest.git Fix player not dying when beated to death by other player --- 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; }