View Single Post
Old 07-10-2019   #5
Tatsuru
2.3 will have menus
Moderator
 
Tatsuru's Avatar
Default

Quote:
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.
I've taken note of that quite earlier (notice the date of the testing being 13 June), but at the time I thought the game would promptly call P_KillMobj due to the fatal damage, so I didn't regard it. Besides, the reason I employed this setup in the first place is because when I tried to alter the damage argument provided by the hook, it didn't seem to work.

At any rate, the function still works if the provided inflictor is correctly passed, despite it making no explicit checks for whether it's nil or not.
__________________
don't care didn't ask plus you put player code in mobjthinker hooks

Last edited by Tatsuru; 07-10-2019 at 08:14 PM.
Tatsuru is offline