diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index aa3935de6..76f6b1a64 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5122,9 +5122,15 @@ static void HWR_ProjectSprite(mobj_t *thing) spr_topoffset = spritecachedinfo[lumpoff].topoffset; #ifdef ROTSPRITE - rollangle = FixedMul(FINECOSINE((ang) >> ANGLETOFINESHIFT), thing->roll) - + FixedMul(FINESINE((ang) >> ANGLETOFINESHIFT), thing->pitch) - + thing->rollangle; + if (papersprite) + rollangle = thing->pitch // pitch should flip the sprite rotation on one side of the papersprite (OpenGL does this by default) + + (ang >= ANGLE_180 ? -1 : 1) * thing->rollangle; // rollangle should use the same rotation for both sides of a papersprite (Software behavior parity) + else + { + rollangle = FixedMul(FINECOSINE((ang) >> ANGLETOFINESHIFT), thing->roll) + + FixedMul(FINESINE((ang) >> ANGLETOFINESHIFT), thing->pitch) + + thing->rollangle; + } if (rollangle && !(splat && !(thing->renderflags & RF_NOSPLATROLLANGLE))) { diff --git a/src/r_things.c b/src/r_things.c index c78f68c28..4ad737821 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1579,9 +1579,15 @@ static void R_ProjectSprite(mobj_t *thing) patch = W_CachePatchNum(sprframe->lumppat[rot], PU_SPRITE); #ifdef ROTSPRITE - rollangle = FixedMul(FINECOSINE((ang) >> ANGLETOFINESHIFT), thing->roll) - + FixedMul(FINESINE((ang) >> ANGLETOFINESHIFT), thing->pitch) - + thing->rollangle; + if (papersprite) + rollangle = (ang >= ANGLE_180 ? -1 : 1) * thing->pitch // pitch should flip the sprite rotation on one side of the papersprite + + thing->rollangle; // rollangle should use the same rotation for both sides of a papersprite + else + { + rollangle = FixedMul(FINECOSINE((ang) >> ANGLETOFINESHIFT), thing->roll) + + FixedMul(FINESINE((ang) >> ANGLETOFINESHIFT), thing->pitch) + + thing->rollangle; + } if (rollangle && !(splat && !(thing->renderflags & RF_NOSPLATROLLANGLE))) {