only ever call pointtoangle for sprites that really need it

This commit is contained in:
Alug committed 2024-12-04 01:39:04 +01:00
1 parent 199fc184b7
commit 6783ef7ff7
1 file changed
+12 -5
+12 -5
View File
@@ -4633,16 +4633,23 @@ static void HWR_ProjectSprite(mobj_t *thing)
I_Error("sprframes NULL for sprite %d\n", thing->sprite);
#endif
ang = R_PointToAngle(interp.x, interp.y);
if (sprframe->rotate != SRF_SINGLE || papersprite ||
#ifdef ROTSPRITE
(shouldrotate)
#endif
)
{
ang = R_PointToAngle(interp.x, interp.y);
#ifdef ROTSPRITE
camang = ang;
camang = ang;
#endif
ang -= interp.angle;
ang -= interp.angle;
if (mirrored)
ang = InvAngle(ang);
if (mirrored)
ang = InvAngle(ang);
}
if (sprframe->rotate == SRF_SINGLE)
{