mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Merge branch 'fix-mobj-hook-deprecation' into 'next'
Fix global mobj hooks deprecation warning always triggering Closes #1293 See merge request STJr/SRB2!2521
This commit is contained in:
commit
fafa522c50
1 changed files with 4 additions and 2 deletions
|
@ -498,7 +498,9 @@ static int call_string_hooks(Hook_State *hook)
|
||||||
|
|
||||||
static int call_mobj_type_hooks(Hook_State *hook, mobjtype_t mobj_type)
|
static int call_mobj_type_hooks(Hook_State *hook, mobjtype_t mobj_type)
|
||||||
{
|
{
|
||||||
if (mobj_type == MT_NULL && (
|
int numCalls = call_mapped(hook, &mobjHookIds[mobj_type][hook->hook_type]);
|
||||||
|
|
||||||
|
if (numCalls > 0 && mobj_type == MT_NULL && (
|
||||||
hook->hook_type == MOBJ_HOOK(MobjThinker )
|
hook->hook_type == MOBJ_HOOK(MobjThinker )
|
||||||
|| hook->hook_type == MOBJ_HOOK(MobjCollide )
|
|| hook->hook_type == MOBJ_HOOK(MobjCollide )
|
||||||
|| hook->hook_type == MOBJ_HOOK(MobjLineCollide)
|
|| hook->hook_type == MOBJ_HOOK(MobjLineCollide)
|
||||||
|
@ -514,7 +516,7 @@ static int call_mobj_type_hooks(Hook_State *hook, mobjtype_t mobj_type)
|
||||||
mobjHookNames[hook->hook_type])
|
mobjHookNames[hook->hook_type])
|
||||||
);
|
);
|
||||||
|
|
||||||
return call_mapped(hook, &mobjHookIds[mobj_type][hook->hook_type]);
|
return numCalls;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void call_hud_hooks
|
static void call_hud_hooks
|
||||||
|
|
Loading…
Reference in a new issue