mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 05:11:08 +00:00
Deprecate performance-sensitive type-agnostic mobj hooks
This commit is contained in:
parent
fffc142d67
commit
947fa0ca5c
1 changed files with 17 additions and 1 deletions
|
@ -498,6 +498,22 @@ static int call_string_hooks(Hook_State *hook)
|
|||
|
||||
static int call_mobj_type_hooks(Hook_State *hook, mobjtype_t mobj_type)
|
||||
{
|
||||
if (mobj_type == MT_NULL && (
|
||||
hook->hook_type == MOBJ_HOOK(MobjThinker )
|
||||
|| hook->hook_type == MOBJ_HOOK(MobjCollide )
|
||||
|| hook->hook_type == MOBJ_HOOK(MobjLineCollide)
|
||||
|| hook->hook_type == MOBJ_HOOK(MobjMoveCollide)
|
||||
|| hook->hook_type == MOBJ_HOOK(MobjFuse )
|
||||
|| hook->hook_type == MOBJ_HOOK(MobjThinker )
|
||||
|| hook->hook_type == MOBJ_HOOK(BossThinker )
|
||||
|| hook->hook_type == MOBJ_HOOK(MobjMoveBlocked)
|
||||
|| hook->hook_type == MOBJ_HOOK(FollowMobj )
|
||||
))
|
||||
LUA_UsageWarning(L, va(
|
||||
"%s hooks not attached to a specific mobj type are deprecated and will be removed.",
|
||||
mobjHookNames[hook->hook_type])
|
||||
);
|
||||
|
||||
return call_mapped(hook, &mobjHookIds[mobj_type][hook->hook_type]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue