From: havoc Date: Wed, 23 May 2007 17:15:21 +0000 (+0000) Subject: remove stupid int casts of pitch/yaw in beam code, yet another instance X-Git-Tag: xonotic-v0.1.0preview~3107 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=e9929fa45ba8f4b2ffba74c52a7d9774d9ea73c4 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 --- 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; }