Expose P_XYMovement to Lua.

It was so easy; it took a grand total of one compile to implement!
Why wasn't this done before...
This commit is contained in:
GoldenTails 2020-04-19 18:41:03 -05:00
parent bc2f83ec05
commit fe67781d68

View file

@ -913,6 +913,17 @@ static int lib_pRailThinker(lua_State *L)
return 1;
}
static int lib_pXYMovement(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_XYMovement(actor);
return 0;
}
// P_USER
////////////
@ -3271,6 +3282,7 @@ static luaL_Reg lib[] = {
{"P_CanRunOnWater",lib_pCanRunOnWater},
{"P_MaceRotate",lib_pMaceRotate},
{"P_RailThinker",lib_pRailThinker},
{"P_XYMovement",lib_pXYMovement},
// p_user
{"P_GetPlayerHeight",lib_pGetPlayerHeight},