Bug 6133 - Allow SDKHook_TakeDamage to optionally NOT bypass the _OnTakeDamage hook
Allow SDKHook_TakeDamage to optionally NOT bypass the _OnTakeDamage hook
Status: RESOLVED FIXED
Product: SourceMod
Classification: Unclassified
Component: SDKHooks
master
All All
: P5 enhancement
Assigned To: SourceMod Bugs
:
: 6605 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-21 20:25 PDT by Derek Howard
Modified: 2021-10-13 13:22 PDT (History)
2 users (show)

See Also:


Attachments

Description Derek Howard 2014-05-21 20:25:21 PDT
https://forums.alliedmods.net/showthread.php?t=240742

Currently, the damage caused by SDKHook_TakeDamage() is intentionally routed around any OnTakeDamage hook that may be on the damaged entity. If possible, this feature should be optional through an additional argument of SDKHook_TakeDamage().

Among other things, this issue has caused my Friendly Mode plugin to be completely unable to cancel damage done to (or by) Friendly players with the RTD effects toxic and timebomb.

Friendly Mode: https://forums.alliedmods.net/showthread.php?t=213205
RTD: https://forums.alliedmods.net/showthread.php?t=75561
Comment 1 Nicholas Hastings [:psychonic] 2017-04-19 04:44:57 PDT
*** Bug 6605 has been marked as a duplicate of this bug. ***
Comment 2 mossj32 2017-04-20 11:45:38 PDT
Agreed whole-heartedly.
Comment 3 Nicholas Hastings [:psychonic] 2021-10-13 13:22:37 PDT
This has now been added as optional in https://github.com/alliedmodders/sourcemod/pull/1598

Note You need to log in before you can comment on or make changes to this bug.