- Exhumed/SW: Make sure the pitch keys are done after the slope tilting.

* Pitch key code does player horizon bounding.
This commit is contained in:
Mitchell Richters 2023-03-27 08:28:23 +11:00
parent 4bf2f70d7b
commit 4fa12a9e30
2 changed files with 5 additions and 9 deletions

View file

@ -1468,8 +1468,8 @@ static void doPlayerPitch(Player* const pPlayer, const double nDestVertPan)
pPlayer->pActor->spr.Angles.Pitch += DAngle::fromDeg(pInput->horz);
}
pPlayer->Angles.doPitchKeys(pInput);
pPlayer->Angles.ViewAngles.Pitch += maphoriz(abs(nVertPan) >= 4 ? Sgn(nVertPan) * 4. : nVertPan * 2.);
pPlayer->Angles.doPitchKeys(pInput);
}
//---------------------------------------------------------------------------

View file

@ -2155,9 +2155,8 @@ void DoPlayerMove(PLAYER* pp)
pp->actor->spr.Angles.Pitch += DAngle::fromDeg(pp->input.horz);
}
pp->Angles.doPitchKeys(&pp->input);
DoPlayerSlopeTilting(pp);
pp->Angles.doPitchKeys(&pp->input);
if (pp->insector() && (pp->cursector->extra & SECTFX_DYNAMIC_AREA))
{
@ -2728,9 +2727,8 @@ void DoPlayerMoveVehicle(PLAYER* pp)
pp->actor->spr.Angles.Pitch += DAngle::fromDeg(pp->input.horz);
}
pp->Angles.doPitchKeys(&pp->input);
DoPlayerSlopeTilting(pp);
pp->Angles.doPitchKeys(&pp->input);
DoTankTreads(pp);
}
@ -2764,9 +2762,8 @@ void DoPlayerMoveTurret(PLAYER* pp)
pp->actor->spr.Angles.Pitch += DAngle::fromDeg(pp->input.horz);
}
pp->Angles.doPitchKeys(&pp->input);
DoPlayerSlopeTilting(pp);
pp->Angles.doPitchKeys(&pp->input);
}
//---------------------------------------------------------------------------
@ -3362,9 +3359,8 @@ void DoPlayerClimb(PLAYER* pp)
pp->actor->spr.Angles.Pitch += DAngle::fromDeg(pp->input.horz);
}
pp->Angles.doPitchKeys(&pp->input);
DoPlayerSlopeTilting(pp);
pp->Angles.doPitchKeys(&pp->input);
if (FAF_ConnectArea(pp->cursector))
{