Move the clamping of hp/breath when their maximums change to read_object_properties...
authorBeha <shacknetisp@mail.com>
Tue, 30 Jul 2019 15:29:45 +0000 (11:29 -0400)
committersfan5 <sfan5@live.de>
Tue, 30 Jul 2019 15:29:45 +0000 (17:29 +0200)
commitb8aaef704d3e29c43edc3312a3c5e25516d9c864
tree9640e90c11c60982c0c2655c9a5f16864d649744
parent2dd645134eaab7611d167e2cb8469242e642c7ef
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).
src/content_sao.cpp
src/script/common/c_content.cpp
src/script/common/c_content.h
src/script/cpp_api/s_entity.cpp
src/script/cpp_api/s_entity.h
src/script/lua_api/l_object.cpp