K_GetScreenCoords: fix signed overflow

why even cast that to signed......
This commit is contained in:
Alug committed 2025-11-21 18:54:42 +01:00
1 parent f811304271
commit c51e741b6f
1 file changed
+1 -1
+1 -1
View File
@@ -2872,7 +2872,7 @@ static boolean K_GetScreenCoords(vector2_t *vec, player_t *player, mobj_t *targe
// X coordinate
// get difference between camangle and angle towards target
x = (INT32)viewangle - (INT32)R_PointToAngle(targx, targy);
x = (fixed_t)(viewangle - R_PointToAngle(targx, targy));
distfact = FINECOSINE((x>>ANGLETOFINESHIFT) & FINEMASK);
if (!distfact) distfact = 1;