Expose P_TouchSpecialThing

This commit is contained in:
SMS Alfredo 2023-05-31 22:21:31 -05:00
parent d6d424f102
commit 39869b4492

View file

@ -2195,6 +2195,19 @@ static int lib_pDoMatchSuper(lua_State *L)
return 0; return 0;
} }
static int lib_pTouchSpecialThing(lua_State *L)
{
mobj_t *special = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
mobj_t *toucher = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
boolean heightcheck = lua_optboolean(L, 3);
NOHUD
INLEVEL
if (!special || !toucher)
return LUA_ErrInvalid(L, "mobj_t");
P_TouchSpecialThing(special, toucher, heightcheck);
return 0;
}
// P_SPEC // P_SPEC
//////////// ////////////
@ -4133,6 +4146,7 @@ static luaL_Reg lib[] = {
{"P_FloorzAtPos",lib_pFloorzAtPos}, {"P_FloorzAtPos",lib_pFloorzAtPos},
{"P_CeilingzAtPos",lib_pCeilingzAtPos}, {"P_CeilingzAtPos",lib_pCeilingzAtPos},
{"P_DoSpring",lib_pDoSpring}, {"P_DoSpring",lib_pDoSpring},
{"P_TouchSpecialThing",lib_pTouchSpecialThing},
{"P_TryCameraMove", lib_pTryCameraMove}, {"P_TryCameraMove", lib_pTryCameraMove},
{"P_TeleportCameraMove", lib_pTeleportCameraMove}, {"P_TeleportCameraMove", lib_pTeleportCameraMove},