mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 01:25:20 +02: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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user