From 6ffb5fa164ccdb8c7942a3727f989937b84f0f9e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 2 Apr 2016 22:12:52 +0200 Subject: [PATCH] - fixed: Angular interpolation needs to call deltaangle instead of using the difference between two angles to avoid overflow conditions. --- src/r_utility.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_utility.cpp b/src/r_utility.cpp index dea794b96e..94c2b0c004 100644 --- a/src/r_utility.cpp +++ b/src/r_utility.cpp @@ -673,8 +673,8 @@ void R_InterpolateView (player_t *player, double Frac, InterpolationViewer *ivie } else { - ViewPitch = (iview->Old.Angles.Pitch + (iview->New.Angles.Pitch - iview->Old.Angles.Pitch) * Frac).Normalized180(); - ViewAngle = (oviewangle + (nviewangle - oviewangle) * Frac).Normalized180(); + ViewPitch = (iview->Old.Angles.Pitch + deltaangle(iview->Old.Angles.Pitch, iview->New.Angles.Pitch) * Frac).Normalized180(); + ViewAngle = (oviewangle + deltaangle(oviewangle, nviewangle) * Frac).Normalized180(); } // Due to interpolation this is not necessarily the same as the sector the camera is in.