diff --git a/src/hardware/hw_clip.c b/src/hardware/hw_clip.c index 594a0aa87..be8b21dcd 100644 --- a/src/hardware/hw_clip.c +++ b/src/hardware/hw_clip.c @@ -318,7 +318,7 @@ void gld_clipper_Clear(void) angle_t gld_FrustumAngle(angle_t tiltangle) { - double fov2; + double clipfov; double floatangle; angle_t a1; @@ -335,8 +335,8 @@ angle_t gld_FrustumAngle(angle_t tiltangle) // ok, this is a gross hack that barely works... // but at least it doesn't overestimate too much... - fov2 = atan(1 / projMatrix[0]) * 360 / M_PIl; - floatangle = 2.0f + (45.0f + (tilt / 1.9f)) * fov2 / 90.0f; + clipfov = atan(1 / projMatrix[0]) * 360 / M_PIl; + floatangle = 2.0f + (45.0f + (tilt / 1.9f)) * clipfov / 90.0f; if (floatangle >= 180.0) return 0xffffffff; a1 = (angle_t)xs_CRoundToInt(ANG1 * floatangle);