Expose P_SceneryXYMovement to Lua.

Ironically this seems slightly more advanced than P_RingXYMovement...
This commit is contained in:
GoldenTails 2020-04-19 20:22:41 -05:00
parent 6ac3d62321
commit 27c25bfa1e
3 changed files with 14 additions and 1 deletions

View File

@ -935,6 +935,17 @@ static int lib_pRingXYMovement(lua_State *L)
return 0;
}
static int lib_pSceneryXYMovement(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_SceneryXYMovement(actor);
return 0;
}
// P_USER
////////////
@ -3295,6 +3306,7 @@ static luaL_Reg lib[] = {
{"P_RailThinker",lib_pRailThinker},
{"P_XYMovement",lib_pXYMovement},
{"P_RingXYMovement",lib_pRingXYMovement},
{"P_SceneryXYMovement",lib_pSceneryXYMovement},
// p_user
{"P_GetPlayerHeight",lib_pGetPlayerHeight},

View File

@ -2111,7 +2111,7 @@ void P_RingXYMovement(mobj_t *mo)
P_SlideMove(mo);
}
static void P_SceneryXYMovement(mobj_t *mo)
void P_SceneryXYMovement(mobj_t *mo)
{
fixed_t oldx, oldy; // reducing bobbing/momentum on ice when up against walls

View File

@ -472,6 +472,7 @@ 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_SceneryXYMovement(mobj_t *mo);
void P_EmeraldManager(void);
extern INT32 modulothing;