K_GetScreenCoords: fix signed overflow
why even cast that to signed......
This commit is contained in:
1 parent
f811304271
commit
c51e741b6f
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user