mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 05:30:48 +00:00
Expose P_RingXYMovement to Lua.
Ever wanted to move like a ring horizontally?
This commit is contained in:
parent
fe67781d68
commit
6ac3d62321
3 changed files with 14 additions and 1 deletions
|
@ -924,6 +924,17 @@ static int lib_pXYMovement(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lib_pRingXYMovement(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_RingXYMovement(actor);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// P_USER
|
||||
////////////
|
||||
|
||||
|
@ -3283,6 +3294,7 @@ static luaL_Reg lib[] = {
|
|||
{"P_MaceRotate",lib_pMaceRotate},
|
||||
{"P_RailThinker",lib_pRailThinker},
|
||||
{"P_XYMovement",lib_pXYMovement},
|
||||
{"P_RingXYMovement",lib_pRingXYMovement},
|
||||
|
||||
// p_user
|
||||
{"P_GetPlayerHeight",lib_pGetPlayerHeight},
|
||||
|
|
|
@ -2102,7 +2102,7 @@ void P_XYMovement(mobj_t *mo)
|
|||
P_XYFriction(mo, oldx, oldy);
|
||||
}
|
||||
|
||||
static void P_RingXYMovement(mobj_t *mo)
|
||||
void P_RingXYMovement(mobj_t *mo)
|
||||
{
|
||||
I_Assert(mo != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mo));
|
||||
|
|
|
@ -471,6 +471,7 @@ void P_NullPrecipThinker(precipmobj_t *mobj);
|
|||
void P_RemovePrecipMobj(precipmobj_t *mobj);
|
||||
void P_SetScale(mobj_t *mobj, fixed_t newscale);
|
||||
void P_XYMovement(mobj_t *mo);
|
||||
void P_RingXYMovement(mobj_t *mo);
|
||||
void P_EmeraldManager(void);
|
||||
|
||||
extern INT32 modulothing;
|
||||
|
|
Loading…
Reference in a new issue