Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
If player is dead, permit it to respawn, even if damages are not enabled
* Mods can do setHP function to do damages and override the enable_damage value sometimes
- Loading branch information
aaf26b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually mods only should be able to damage the player, e.g. by changing hp, if enable_damage is true
if they need to look for this manually, a lot mods would need to become updated, I think
aaf26b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No set_hp call is correct. I will propre a do_damage PR and this call must be used by mods, because enable_damage will use it :)
set_hp is more powerful but misused by modders
aaf26b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, set_hp only worked for non player entities if damage was disabled.
aaf26b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l_object.cpp L251
ServerActiveObject *co = getobject(ref);
co->setHP(hp);
No filtering. Everything can be affected by this