From b56402a0a98291a6c8834b2a4061efaa0580b85c Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 16 Dec 2023 05:31:49 +0100 Subject: [PATCH] software sprites should do the same as opengl no idea why it even was like that tbh sliptiding was not toggable here Fixes https://github.com/Indev450/SRB2Kart-Saturn/issues/82 --- src/r_things.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/r_things.c b/src/r_things.c index 0278bf32a..d112c05f2 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1489,19 +1489,15 @@ static void R_ProjectSprite(mobj_t *thing) spr_topoffset = spritecachedinfo[lump].topoffset; #ifdef ROTSPRITE - if (thing->player) - { - sliptiderollangle = FixedMul(FINECOSINE((ang) >> ANGLETOFINESHIFT), ((cv_sloperoll.value == 1) ? thing->player->sliproll*(thing->player->sliptidemem) : 0)); - } - else - sliptiderollangle = 0; - - if ((thing->rollangle)||(thing->sloperoll)||sliptiderollangle) + if ((thing->rollangle)||(thing->sloperoll)||(thing->player && thing->player->sliproll)) { if (thing->player) - rollsum = (thing->rollangle) + (thing->sloperoll) + sliptiderollangle; + { + sliptiderollangle = cv_sliptideroll.value ? thing->player->sliproll*(thing->player->sliptidemem) : 0; + rollsum = (thing->rollangle)+(thing->sloperoll)+FixedMul(FINECOSINE((ang) >> ANGLETOFINESHIFT), sliptiderollangle); + } else - rollsum = (thing->rollangle) + (thing->sloperoll); + rollsum = (thing->rollangle)+(thing->sloperoll); rollangle = R_GetRollAngle(rollsum); rotsprite = Patch_GetRotatedSprite(sprframe, (thing->frame & FF_FRAMEMASK), rot, flip, false, sprinfo, rollangle);