- fixed: Angular interpolation needs to call deltaangle instead of using the difference between two angles to avoid overflow conditions.

This commit is contained in:
Christoph Oelckers 2016-04-02 22:12:52 +02:00
parent 9b5a4b6d43
commit 6ffb5fa164

View file

@ -673,8 +673,8 @@ void R_InterpolateView (player_t *player, double Frac, InterpolationViewer *ivie
} }
else else
{ {
ViewPitch = (iview->Old.Angles.Pitch + (iview->New.Angles.Pitch - iview->Old.Angles.Pitch) * Frac).Normalized180(); ViewPitch = (iview->Old.Angles.Pitch + deltaangle(iview->Old.Angles.Pitch, iview->New.Angles.Pitch) * Frac).Normalized180();
ViewAngle = (oviewangle + (nviewangle - oviewangle) * 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. // Due to interpolation this is not necessarily the same as the sector the camera is in.