mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-05-31 08:51:03 +00:00
Added MobjMoveBlocked Lua hook
Also slightly edited P_XYMovement to properly check the mobj still exists before checking its eflags for MFE_SPRUNG, while I was at it
This commit is contained in:
parent
930527a3d6
commit
e3ded1671c
3 changed files with 24 additions and 7 deletions
|
@ -56,6 +56,7 @@ const char *const hookNames[hook_MAX+1] = {
|
|||
"PlayerSpawn",
|
||||
"ShieldSpawn",
|
||||
"ShieldSpecial",
|
||||
"MobjMoveBlocked",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -126,6 +127,7 @@ static int lib_addHook(lua_State *L)
|
|||
case hook_BossDeath:
|
||||
case hook_MobjRemoved:
|
||||
case hook_HurtMsg:
|
||||
case hook_MobjMoveBlocked:
|
||||
hook.s.mt = MT_NULL;
|
||||
if (lua_isnumber(L, 2))
|
||||
hook.s.mt = lua_tonumber(L, 2);
|
||||
|
@ -184,6 +186,7 @@ static int lib_addHook(lua_State *L)
|
|||
case hook_MobjDeath:
|
||||
case hook_BossDeath:
|
||||
case hook_MobjRemoved:
|
||||
case hook_MobjMoveBlocked:
|
||||
lastp = &mobjhooks[hook.s.mt];
|
||||
break;
|
||||
case hook_JumpSpecial:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue