mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 05:41:42 +00:00
Merge branch 'expos-special' into 'next'
Expose P_TouchSpecialThing to Lua See merge request STJr/SRB2!1993
This commit is contained in:
commit
f81b0c78ad
1 changed files with 16 additions and 0 deletions
|
@ -2223,6 +2223,21 @@ 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");
|
||||||
|
if (!toucher->player)
|
||||||
|
return luaL_error(L, "P_TouchSpecialThing requires a valid toucher.player.");
|
||||||
|
P_TouchSpecialThing(special, toucher, heightcheck);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// P_SPEC
|
// P_SPEC
|
||||||
////////////
|
////////////
|
||||||
|
|
||||||
|
@ -4214,6 +4229,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},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue