mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
No damage effects on hp_max change (#11846)
This commit is contained in:
parent
3eafcab64e
commit
f4a53f7ee6
9 changed files with 23 additions and 11 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue