Fix player not dying when beated to death by other player
authorPerttu Ahola <celeron55@gmail.com>
Sun, 4 Dec 2011 01:56:22 +0000 (03:56 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 4 Dec 2011 01:56:22 +0000 (03:56 +0200)
src/server.cpp

index e33a675c4a00d02ecc809be20c2858ddc7a84d50..8fbc0f793dd761a047bfbd3506806dd0f2ecb1c6 100644 (file)
@@ -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;
        }