1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-04 08:25:01 -05:00

Reset the old HP method on PlayerSAO::setHP

This commit is contained in:
Loic Blot 2015-03-18 19:41:25 +01:00
parent 538036d004
commit 2676d289d9

View File

@ -1072,6 +1072,10 @@ void PlayerSAO::setHP(s16 hp)
else if (hp > PLAYER_MAX_HP) else if (hp > PLAYER_MAX_HP)
hp = PLAYER_MAX_HP; hp = PLAYER_MAX_HP;
if(hp < oldhp && g_settings->getBool("enable_damage") == false) {
return;
}
m_player->hp = hp; m_player->hp = hp;
if (oldhp > hp) if (oldhp > hp)