From: Mario Date: Wed, 5 Aug 2015 12:26:10 +0000 (+1000) Subject: Make TimePath happier X-Git-Tag: xonotic-v0.8.1~21^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4e0ee1f298dcdcb89f0d990a70f59c79a96a5fe8;p=xonotic%2Fxonotic-data.pk3dir.git Make TimePath happier --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 3bd566f2a..75a538624 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -230,11 +230,10 @@ vector GetCurrentFov(float fov) vector GetViewLocationFOV(float fov) { - float frustumx, frustumy, fovx, fovy; - frustumy = tan(fov * M_PI / 360.0) * 0.75; - frustumx = frustumy * vid_width / vid_height / vid_pixelheight; - fovx = atan2(frustumx, 1) / M_PI * 360.0; - fovy = atan2(frustumy, 1) / M_PI * 360.0; + float frustumy = tan(fov * M_PI / 360.0) * 0.75; + float frustumx = frustumy * vid_width / vid_height / vid_pixelheight; + float fovx = atan2(frustumx, 1) / M_PI * 360.0; + float fovy = atan2(frustumy, 1) / M_PI * 360.0; return '1 0 0' * fovx + '0 1 0' * fovy; }