mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Expose function to Lua
This commit is contained in:
parent
ca88db00cd
commit
feb011ee52
1 changed files with 14 additions and 1 deletions
|
@ -1601,6 +1601,18 @@ static int lib_pFloorzAtPos(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lib_pCeilingzAtPos(lua_State *L)
|
||||
{
|
||||
fixed_t x = luaL_checkfixed(L, 1);
|
||||
fixed_t y = luaL_checkfixed(L, 2);
|
||||
fixed_t z = luaL_checkfixed(L, 3);
|
||||
fixed_t height = luaL_checkfixed(L, 4);
|
||||
//HUDSAFE
|
||||
INLEVEL
|
||||
lua_pushfixed(L, P_CeilingzAtPos(x, y, z, height));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lib_pDoSpring(lua_State *L)
|
||||
{
|
||||
mobj_t *spring = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||
|
@ -3316,7 +3328,8 @@ static luaL_Reg lib[] = {
|
|||
{"P_CheckSight", lib_pCheckSight},
|
||||
{"P_CheckHoopPosition",lib_pCheckHoopPosition},
|
||||
{"P_RadiusAttack",lib_pRadiusAttack},
|
||||
{"P_FloorzAtPos",lib_pFloorzAtPos},
|
||||
{"P_FloorzAtPos",lib_pCeilingzAtPos},
|
||||
{"P_CeilingzAtPos",lib_pFloorzAtPos},
|
||||
{"P_DoSpring",lib_pDoSpring},
|
||||
|
||||
// p_inter
|
||||
|
|
Loading…
Reference in a new issue