summaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_entity.h
diff options
context:
space:
mode:
authorBeha <shacknetisp@mail.com>2019-07-30 11:29:45 -0400
committersfan5 <sfan5@live.de>2019-07-30 17:29:45 +0200
commitb8aaef704d3e29c43edc3312a3c5e25516d9c864 (patch)
tree9640e90c11c60982c0c2655c9a5f16864d649744 /src/script/cpp_api/s_entity.h
parent2dd645134eaab7611d167e2cb8469242e642c7ef (diff)
downloadminetest-b8aaef704d3e29c43edc3312a3c5e25516d9c864.tar.gz
minetest-b8aaef704d3e29c43edc3312a3c5e25516d9c864.tar.bz2
minetest-b8aaef704d3e29c43edc3312a3c5e25516d9c864.zip
Move the clamping of hp/breath when their maximums change to read_object_properties(). (#8689)
This prevents set_properties() calls that have nothing to do with hp_max or breath_max overriding the saved hp before another mod has the chance to set a player's intended hp_max (such as in on_joinplayer).
Diffstat (limited to 'src/script/cpp_api/s_entity.h')
-rw-r--r--src/script/cpp_api/s_entity.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/cpp_api/s_entity.h b/src/script/cpp_api/s_entity.h
index 966c2745e..cc08c46e8 100644
--- a/src/script/cpp_api/s_entity.h
+++ b/src/script/cpp_api/s_entity.h
@@ -35,7 +35,7 @@ public:
void luaentity_Remove(u16 id);
std::string luaentity_GetStaticdata(u16 id);
void luaentity_GetProperties(u16 id,
- ObjectProperties *prop);
+ ServerActiveObject *self, ObjectProperties *prop);
void luaentity_Step(u16 id, float dtime);
bool luaentity_Punch(u16 id,
ServerActiveObject *puncher, float time_from_last_punch,