remove stupid int casts of pitch/yaw in beam code, yet another instance
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 23 May 2007 17:15:21 +0000 (17:15 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 23 May 2007 17:15:21 +0000 (17:15 +0000)
of this legacy from quake that I hadn't killed yet

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7350 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c

index 8cba25a..12704f5 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -1554,7 +1554,7 @@ void CL_RelinkBeams(void)
        vec3_t dist, org, start, end;
        float d;
        entity_t *ent;
-       float yaw, pitch;
+       double yaw, pitch;
        float forward;
        matrix4x4_t tempmatrix;
 
@@ -1597,12 +1597,12 @@ void CL_RelinkBeams(void)
                }
                else
                {
-                       yaw = (int) (atan2(dist[1], dist[0]) * 180 / M_PI);
+                       yaw = atan2(dist[1], dist[0]) * 180 / M_PI;
                        if (yaw < 0)
                                yaw += 360;
 
                        forward = sqrt (dist[0]*dist[0] + dist[1]*dist[1]);
-                       pitch = (int) (atan2(dist[2], forward) * 180 / M_PI);
+                       pitch = atan2(dist[2], forward) * 180 / M_PI;
                        if (pitch < 0)
                                pitch += 360;
                }