Fix erratic ViewPitch when loading saves.

This commit is contained in:
Mari the Deer 2023-02-11 18:47:48 +01:00
commit 1e07b67770
2 changed files with 7 additions and 5 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r746 \cu(Sat 11 Feb 17:13:54 CET 2023)\c-";
SWWM_SHORTVER="\cw1.3pre r746 \cu(2023-02-11 17:13:54)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r746 \cu(Sat 11 Feb 19:17:38 CET 2023)\c-";
SWWM_SHORTVER="\cw1.3pre r746 \cu(2023-02-11 19:17:38)\c-";

View file

@ -449,9 +449,11 @@ extend Class Demolitionist
bumproll *= .8;
}
// stabilize view angles
A_SetViewAngle(temp.x*.8,SPF_INTERPOLATE);
A_SetViewPitch(temp.y*.8,SPF_INTERPOLATE);
A_SetViewRoll(temp.z*.8,SPF_INTERPOLATE);
temp *= .8;
if ( temp dot temp < double.epsilon ) temp = (0,0,0);
if ( ViewAngle != temp.x ) A_SetViewAngle(temp.x,SPF_INTERPOLATE);
if ( ViewPitch != temp.y ) A_SetViewPitch(temp.y,SPF_INTERPOLATE);
if ( ViewRoll != temp.z ) A_SetViewRoll(temp.z,SPF_INTERPOLATE);
if ( player.onground && !lastground ) landvelz = lastvelz;
else if ( !player.onground && lastground ) landvelz = 0;
else if ( player.onground && lastground ) landvelz *= .9;