From 684ab4fd66ffb1fd3980fadbb216c480602c1404 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Tue, 10 Jun 2008 09:12:12 +0000 Subject: [PATCH] fovy fix git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2172 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/rendergl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/src/rendergl.cpp b/source/src/rendergl.cpp index 1f41576a..21c163bf 100644 --- a/source/src/rendergl.cpp +++ b/source/src/rendergl.cpp @@ -768,9 +768,10 @@ void gl_drawframe(int w, int h, float changelod, float curfps) recomputecamera(); + aspect = float(w)/h; + fovy = 2*atan2(tan(float(dynfov())/2*RAD), aspect)/RAD; + float hf = hdr.waterlevel-0.3f; - fovy = (float)dynfov()*h/w; - aspect = w/(float)h; bool underwater = camera1->o.z