From bc9e7c146126bdd65f79c8fb5f37930d41b2816e Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 25 Oct 2022 22:20:20 -0700 Subject: [PATCH] Disable sprite/model rotation on slopes for now --- src/hardware/hw_md2.c | 5 +++++ src/p_mobj.c | 5 +++++ src/r_patchrotation.c | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index f0108969f..fca3af217 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1630,8 +1630,13 @@ boolean HWR_DrawModel(gl_vissprite_t *spr) } } +#if 0 p.anglez = FIXED_TO_FLOAT(AngleFixed(interp.pitch)); p.anglex = FIXED_TO_FLOAT(AngleFixed(interp.roll)); +#else + p.anglez = 0.f; + p.anglex = 0.f; +#endif p.flip = atransform.flip; p.mirror = atransform.mirror; diff --git a/src/p_mobj.c b/src/p_mobj.c index 9a889d516..a25b5643b 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1556,6 +1556,7 @@ void P_CheckGravity(mobj_t *mo, boolean affect) // void P_SetPitchRollFromSlope(mobj_t *mo, pslope_t *slope) { +#if 0 if (slope) { fixed_t tempz = slope->normal.z; @@ -1569,6 +1570,10 @@ void P_SetPitchRollFromSlope(mobj_t *mo, pslope_t *slope) { mo->pitch = mo->roll = 0; } +#else + (void)mo; + (void)slope; +#endif } #define STOPSPEED (FRACUNIT) diff --git a/src/r_patchrotation.c b/src/r_patchrotation.c index a17b725d6..b0cbeaa42 100644 --- a/src/r_patchrotation.c +++ b/src/r_patchrotation.c @@ -26,6 +26,7 @@ angle_t R_ModelRotationAngle(interpmobjstate_t *interp) angle_t R_SpriteRotationAngle(interpmobjstate_t *interp) { +#if 0 angle_t viewingAngle = R_PointToAngle(interp->x, interp->y); fixed_t pitchMul = -FINESINE(viewingAngle >> ANGLETOFINESHIFT); @@ -34,6 +35,9 @@ angle_t R_SpriteRotationAngle(interpmobjstate_t *interp) angle_t rollOrPitch = FixedMul(interp->pitch, pitchMul) + FixedMul(interp->roll, rollMul); return (rollOrPitch + R_ModelRotationAngle(interp)); +#else + return R_ModelRotationAngle(interp); +#endif } INT32 R_GetRollAngle(angle_t rollangle)