mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
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).
This commit is contained in:
parent
2dd645134e
commit
b8aaef704d
6 changed files with 26 additions and 22 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue