From 8c62a0d640c4e556db8018ac93cac5fb9578ff37 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Tue, 22 Mar 2022 05:53:21 -0400 Subject: [PATCH] Fix papersprites being rotated incorrectly in Software when viewing them on the flipped side --- src/r_things.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/r_things.c b/src/r_things.c index 1179b9f4d..db4263a6a 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1611,7 +1611,16 @@ static void R_ProjectSprite(mobj_t *thing) if (thing->rollangle && !(splat && !(thing->renderflags & RF_NOSPLATROLLANGLE))) { - rollangle = R_GetRollAngle(thing->rollangle); + if (papersprite && ang >= ANGLE_180) + { + // Makes Software act much more sane like OpenGL + rollangle = R_GetRollAngle(InvAngle(thing->rollangle)); + } + else + { + rollangle = R_GetRollAngle(thing->rollangle); + } + rotsprite = Patch_GetRotatedSprite(sprframe, (thing->frame & FF_FRAMEMASK), rot, flip, false, sprinfo, rollangle); if (rotsprite != NULL)