diff options
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_object.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index 7ff1f58bc..ad8554834 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -757,20 +757,7 @@ int ObjectRef::l_set_properties(lua_State *L) if (!prop) return 0; - read_object_properties(L, 2, prop, getServer(L)->idef()); - - PlayerSAO *player = getplayersao(ref); - - if (prop->hp_max < co->getHP()) { - PlayerHPChangeReason reason(PlayerHPChangeReason::SET_HP); - co->setHP(prop->hp_max, reason); - if (player) - getServer(L)->SendPlayerHPOrDie(player, reason); - } - - if (player && prop->breath_max < player->getBreath()) - player->setBreath(prop->breath_max); - + read_object_properties(L, 2, co, prop, getServer(L)->idef()); co->notifyObjectPropertiesModified(); return 0; } |