mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 05:41:42 +00:00
Expose P_RingZMovement to Lua.
Ever wanted to move like a ring vertically?
This commit is contained in:
parent
6d3a2919a2
commit
4710e4f07c
3 changed files with 13 additions and 1 deletions
|
@ -957,6 +957,16 @@ static int lib_pZMovement(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lib_pRingZMovement(lua_State *L)
|
||||
{
|
||||
mobj_t *actor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||
NOHUD
|
||||
INLEVEL
|
||||
if (!actor)
|
||||
return LUA_ErrInvalid(L, "mobj_t");
|
||||
P_RingZMovement(actor);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// P_USER
|
||||
////////////
|
||||
|
@ -3320,6 +3330,7 @@ static luaL_Reg lib[] = {
|
|||
{"P_RingXYMovement",lib_pRingXYMovement},
|
||||
{"P_SceneryXYMovement",lib_pSceneryXYMovement},
|
||||
{"P_ZMovement",lib_pZMovement},
|
||||
{"P_RingZMovement",lib_pRingZMovement},
|
||||
|
||||
// p_user
|
||||
{"P_GetPlayerHeight",lib_pGetPlayerHeight},
|
||||
|
|
|
@ -2270,7 +2270,7 @@ static void P_AdjustMobjFloorZ_PolyObjs(mobj_t *mo, subsector_t *subsec)
|
|||
}
|
||||
}
|
||||
|
||||
static void P_RingZMovement(mobj_t *mo)
|
||||
void P_RingZMovement(mobj_t *mo)
|
||||
{
|
||||
I_Assert(mo != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mo));
|
||||
|
|
|
@ -474,6 +474,7 @@ void P_XYMovement(mobj_t *mo);
|
|||
void P_RingXYMovement(mobj_t *mo);
|
||||
void P_SceneryXYMovement(mobj_t *mo);
|
||||
boolean P_ZMovement(mobj_t *mo);
|
||||
void P_RingZMovement(mobj_t *mo);
|
||||
void P_EmeraldManager(void);
|
||||
|
||||
extern INT32 modulothing;
|
||||
|
|
Loading…
Reference in a new issue