summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorLars Müller <34514239+appgurueu@users.noreply.github.com>2022-06-11 20:00:40 +0200
committerGitHub <noreply@github.com>2022-06-11 20:00:40 +0200
commitf4a53f7ee6fb5482f8193353c35be54b40533d6f (patch)
treefbbf1f323a0f0340e9f07c851bfba7c23e30b670 /src/script
parent3eafcab64ecaf8d00a9264b441e996825a6a31bd (diff)
downloadminetest-f4a53f7ee6fb5482f8193353c35be54b40533d6f.tar.gz
minetest-f4a53f7ee6fb5482f8193353c35be54b40533d6f.tar.bz2
minetest-f4a53f7ee6fb5482f8193353c35be54b40533d6f.zip
No damage effects on hp_max change (#11846)
Diffstat (limited to 'src/script')
-rw-r--r--src/script/common/c_content.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index f232e9e5d..33f42cd4a 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -198,7 +198,7 @@ void read_object_properties(lua_State *L, int index,
prop->hp_max = (u16)rangelim(hp_max, 0, U16_MAX);
if (prop->hp_max < sao->getHP()) {
- PlayerHPChangeReason reason(PlayerHPChangeReason::SET_HP);
+ PlayerHPChangeReason reason(PlayerHPChangeReason::SET_HP_MAX);
sao->setHP(prop->hp_max, reason);
}
}