- Exhumed: Clear all input out upon restarting the player.

* Stale accumulation from the last round can apply on the next tic.
This commit is contained in:
Mitchell Richters 2023-03-26 15:17:28 +11:00
parent 776c58c58a
commit 7d5ca901eb

View file

@ -298,6 +298,7 @@ void RestartPlayer(int nPlayer)
pPlayer->nAir = 100; pPlayer->nAir = 100;
pPlayer->pPlayerGrenade = nullptr; pPlayer->pPlayerGrenade = nullptr;
pPlayer->dVertPan = 0; pPlayer->dVertPan = 0;
pPlayer->vel.Zero();
pPlayer->nThrust.Zero(); pPlayer->nThrust.Zero();
pPlayer->nDestVertPan = pPlayerActor->PrevAngles.Pitch = pPlayerActor->spr.Angles.Pitch = nullAngle; pPlayer->nDestVertPan = pPlayerActor->PrevAngles.Pitch = pPlayerActor->spr.Angles.Pitch = nullAngle;
pPlayer->nBreathTimer = 90; pPlayer->nBreathTimer = 90;
@ -335,6 +336,9 @@ void RestartPlayer(int nPlayer)
} }
BuildRa(nPlayer); BuildRa(nPlayer);
// clear out all input before finishing here
inputState.ClearAllInput();
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------