diff options
author | Tim Angus <tim@ngus.net> | 2002-02-16 02:04:05 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2002-02-16 02:04:05 +0000 |
commit | 2527ce7054755544a4fe1269591663bfd2d139ac (patch) | |
tree | 6807cee4e7191decd26b71c4b8294777b3f70d0e /src | |
parent | 1377fc75295277a46f7d5b314e7f91dfab218b13 (diff) |
Comments
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_scanner.c | 5 |
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 ); |