From 4e0ee1f298dcdcb89f0d990a70f59c79a96a5fe8 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 5 Aug 2015 22:26:10 +1000 Subject: [PATCH] Make TimePath happier --- qcsrc/client/view.qc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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; } -- 2.39.2