projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
538036d
)
Reset the old HP method on PlayerSAO::setHP
author
Loic Blot
<loic.blot@unix-experience.fr>
Wed, 18 Mar 2015 18:41:25 +0000
(19:41 +0100)
committer
Loic Blot
<loic.blot@unix-experience.fr>
Thu, 19 Mar 2015 06:47:45 +0000
(07:47 +0100)
src/content_sao.cpp
patch
|
blob
|
history
diff --git
a/src/content_sao.cpp
b/src/content_sao.cpp
index e58aa4b6e6ea909a350de0fbde11dd3fc9c87c13..9fc61aea70479c5c36d82af91f0b573a7ac159d7 100644
(file)
--- 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)