From c0ed28e828e2cd65f0d600af6a0615bd2504b4cd Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sun, 5 Nov 2017 02:17:13 -0500 Subject: [PATCH] why didn't this merge before?? --- src/lua_baselib.c | 3 ++- src/p_local.h | 2 +- src/p_map.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index e8e8fd02..aa2ebf65 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -1009,10 +1009,11 @@ static int lib_pTeleportMove(lua_State *L) static int lib_pSlideMove(lua_State *L) { mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); + boolean forceslide = luaL_checkboolean(L, 2); NOHUD if (!mo) return LUA_ErrInvalid(L, "mobj_t"); - P_SlideMove(mo); + P_SlideMove(mo, forceslide); return 0; } diff --git a/src/p_local.h b/src/p_local.h index 235aaa27..8d27d69e 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -327,7 +327,7 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam); boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff); boolean P_Move(mobj_t *actor, fixed_t speed); boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z); -void P_SlideMove(mobj_t *mo); +void P_SlideMove(mobj_t *mo, boolean forceslide); void P_BounceMove(mobj_t *mo); boolean P_CheckSight(mobj_t *t1, mobj_t *t2); void P_CheckHoopPosition(mobj_t *hoopthing, fixed_t x, fixed_t y, fixed_t z, fixed_t radius); diff --git a/src/p_map.c b/src/p_map.c index bc657c9d..6717eaa6 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3587,7 +3587,7 @@ stairstep: // // This is a kludgy mess. // -void P_SlideMove(mobj_t *mo) +void P_SlideMove(mobj_t *mo, boolean forceslide) { fixed_t leadx, leady, trailx, traily, newx, newy; INT16 hitcount = 0; @@ -3665,7 +3665,7 @@ retry: PT_ADDLINES, PTR_SlideTraverse); // Some walls are bouncy even if you're not - if (bestslideline && !(bestslideline->flags & ML_BOUNCY)) // SRB2kart - All walls are bouncy unless specified otherwise + if (!forceslide && bestslideline && !(bestslideline->flags & ML_BOUNCY)) // SRB2kart - All walls are bouncy unless specified otherwise { P_BounceMove(mo); return;