diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2015-03-18 19:41:25 +0100 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2015-03-19 07:47:45 +0100 |
commit | 2676d289d9ac46a3145f3740c75e5078480ff858 (patch) | |
tree | 8874fd7896ad680e77eedd2090e83acb00e492e0 /src | |
parent | 538036d004f914f31c276090d7735d61139fc58e (diff) | |
download | minetest-2676d289d9ac46a3145f3740c75e5078480ff858.tar.gz minetest-2676d289d9ac46a3145f3740c75e5078480ff858.tar.bz2 minetest-2676d289d9ac46a3145f3740c75e5078480ff858.zip |
Reset the old HP method on PlayerSAO::setHP
Diffstat (limited to 'src')
-rw-r--r-- | src/content_sao.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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) |