From: Loic Blot Date: Wed, 18 Mar 2015 18:41:25 +0000 (+0100) Subject: Reset the old HP method on PlayerSAO::setHP X-Git-Tag: 0.4.13~460 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2676d289d9ac46a3145f3740c75e5078480ff858;p=oweals%2Fminetest.git Reset the old HP method on PlayerSAO::setHP --- diff --git a/src/content_sao.cpp b/src/content_sao.cpp index e58aa4b6e..9fc61aea7 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -1072,6 +1072,10 @@ void PlayerSAO::setHP(s16 hp) else if (hp > PLAYER_MAX_HP) hp = PLAYER_MAX_HP; + if(hp < oldhp && g_settings->getBool("enable_damage") == false) { + return; + } + m_player->hp = hp; if (oldhp > hp)