From 326be012760a1f9e1dff38d3162d8120b620a489 Mon Sep 17 00:00:00 2001 From: namishere <50415197+namishere@users.noreply.github.com> Date: Thu, 11 Feb 2021 04:06:40 -0800 Subject: [PATCH] Expose P_ButteredSlope to lua --- src/lua_baselib.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index c5f847be6..240591506 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -2494,6 +2494,17 @@ static int lib_pGetZAt(lua_State *L) return 1; } +static int lib_pButteredSlope(lua_State *L) +{ + mobj_t *mobj = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); + NOHUD + INLEVEL + if (!mobj) + return LUA_ErrInvalid(L, "mobj_t"); + P_ButteredSlope(mobj); + return 0; +} + // R_DEFS //////////// @@ -3932,6 +3943,7 @@ static luaL_Reg lib[] = { // p_slopes {"P_GetZAt",lib_pGetZAt}, + {"P_ButteredSlope",lib_pButteredSlope}, // r_defs {"R_PointToAngle",lib_rPointToAngle},