Bypass A_SetViewPitch to not trigger the "never-will-be-fixed" bug.

This commit is contained in:
Mari the Deer 2023-12-08 22:56:41 +01:00
commit 673cdc6d8f
2 changed files with 19 additions and 5 deletions

View file

@ -453,9 +453,23 @@ extend Class Demolitionist
// stabilize view angles
if ( temp dot temp < double.epsilon ) temp = (0,0,0);
else temp *= .8;
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);
// we have to bypass the A_SetView* functions due to a bug that
// will likely never get addressed
if ( ViewAngle != temp.x )
{
ViewAngle = temp.x;
player.cheats |= CF_INTERPVIEWANGLES;
}
if ( ViewPitch != temp.y )
{
ViewPitch = temp.y;
player.cheats |= CF_INTERPVIEWANGLES;
}
if ( ViewRoll != temp.z )
{
ViewRoll = temp.z;
player.cheats |= CF_INTERPVIEWANGLES;
}
if ( player.onground && !lastground ) landvelz = lastvelz;
else if ( !player.onground && lastground ) landvelz = 0;
else if ( player.onground && lastground ) landvelz *= .9;