View Single Post
Old 07-10-2019   #6
Zwip-Zwap Zapony
Zwip-Zwap Zapony's Avatar

Originally Posted by choalover View Post
You are not supposed to use P_DamageMobj inside of the MobjDamage hook, because the MobjDamage hook is executed whenever P_DamageMobj is executed.
If you return true in a MobjDamage hook, the P_DamageMobj that caused the hook won't be called.

So there can be a reason to use P_DamageMobj inside a MobjDamage hook if one does that, for example to have custom Lua code happen after, not before, the object is damaged.
Zwip-Zwap Zapony is offline