diff --git a/qw_client/screen.c b/qw_client/screen.c index 20a0fdc..260fee0 100644 --- a/qw_client/screen.c +++ b/qw_client/screen.c @@ -268,7 +268,7 @@ float CalcFov (float fov_x, float width, float height) x = width/tan(fov_x/360*M_PI); - a = atan (height/x); + a = (x == 0) ? 90 : atan(height/x); a = a*360/M_PI; diff --git a/uquake/screen.c b/uquake/screen.c index 408e608..4bd9792 100644 --- a/uquake/screen.c +++ b/uquake/screen.c @@ -273,7 +273,7 @@ float CalcFov (float fov_x, float width, float height) x = width/tan(fov_x/360*M_PI); - a = atan (height/x); + a = (x == 0) ? 90 : atan(height/x); a = a*360/M_PI;