save one R_PointToAngle call

very smol optimisation lul
This commit is contained in:
Alug committed 2024-11-30 22:31:45 +01:00
1 parent 3139dff6ba
commit 7de8b2d881
2 files changed
+7 -9

No files matched your search

+4 -5
View File
@@ -4551,15 +4551,14 @@ 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) - interp.angle;
ang = R_PointToAngle(interp.x, interp.y);
#ifdef ROTSPRITE
if (shouldrotate)
{
camang = R_PointToAngle (interp.x, interp.y);
}
camang = ang;
#endif
ang -= interp.angle;
if (mirrored)
ang = InvAngle(ang);
+3 -4
View File
@@ -1278,12 +1278,11 @@ static void R_ProjectSprite(mobj_t *thing)
#endif
)
{
ang = R_PointToAngle (interp.x, interp.y) - interp.angle;
ang = R_PointToAngle(interp.x, interp.y);
#ifdef ROTSPRITE
if (shouldrotate)
camang = R_PointToAngle (interp.x, interp.y);
camang = ang;
#endif
ang -= interp.angle;
if (mirrored)
ang = InvAngle(ang);