From e9929fa45ba8f4b2ffba74c52a7d9774d9ea73c4 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 23 May 2007 17:15:21 +0000 Subject: [PATCH] remove stupid int casts of pitch/yaw in beam code, yet another instance 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cl_main.c b/cl_main.c index 8cba25a7..12704f50 100644 --- 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; } -- 2.39.2