diff options
author | Beha <shacknetisp@mail.com> | 2019-07-30 11:29:45 -0400 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2019-07-30 17:29:45 +0200 |
commit | b8aaef704d3e29c43edc3312a3c5e25516d9c864 (patch) | |
tree | 9640e90c11c60982c0c2655c9a5f16864d649744 /src/script/common/c_content.h | |
parent | 2dd645134eaab7611d167e2cb8469242e642c7ef (diff) | |
download | minetest-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/common/c_content.h')
-rw-r--r-- | src/script/common/c_content.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/common/c_content.h b/src/script/common/c_content.h index f3a653682..9e755682f 100644 --- a/src/script/common/c_content.h +++ b/src/script/common/c_content.h @@ -62,6 +62,7 @@ struct HitParams; struct EnumString; struct NoiseParams; class Schematic; +class ServerActiveObject; ContentFeatures read_content_features (lua_State *L, int index); @@ -107,6 +108,7 @@ void push_item_definition_full (lua_State *L, const ItemDefinition &i); void read_object_properties (lua_State *L, int index, + ServerActiveObject *sao, ObjectProperties *prop, IItemDefManager *idef); void push_object_properties (lua_State *L, |