summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cgame/cg_scanner.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cgame/cg_scanner.c b/src/cgame/cg_scanner.c
index e0966ff4..bec5f195 100644
--- a/src/cgame/cg_scanner.c
+++ b/src/cgame/cg_scanner.c
@@ -89,17 +89,16 @@ static void CG_DrawDir( vec3_t origin, vec4_t colour )
VectorNormalize( noZOrigin );
VectorNormalize( noZview );
+ //calculate the angle between the images of the blip and the view
angle = RAD2DEG( acos( DotProduct( noZOrigin, noZview ) ) );
CrossProduct( noZOrigin, noZview, antinormal );
VectorNormalize( antinormal );
+ //decide which way to rotate
VectorSubtract( normal, antinormal, normalDiff );
-
if( VectorLength( normalDiff ) < 1.0f )
angle = 360.0f - angle;
- CG_Printf( "%f\n", angle );
-
RotatePointAroundVector( drawOrigin, up, top, angle );
trap_R_SetColor( colour );