Add ApplyAirControl

This commit is contained in:
jekyllgrim 2024-04-17 00:49:40 +03:00 committed by Ricardo Luís Vaz Silva
parent 7c93cfa97b
commit 0055042112
1 changed files with 8 additions and 2 deletions

View File

@ -1263,6 +1263,12 @@ class PlayerPawn : Actor
return forward, side;
}
virtual void ApplyAirControl(out double movefactor, out double bobfactor)
{
movefactor *= level.aircontrol;
bobfactor *= level.aircontrol;
}
//----------------------------------------------------------------------------
//
// PROC P_MovePlayer
@ -1306,8 +1312,8 @@ class PlayerPawn : Actor
if (!player.onground && !bNoGravity && !waterlevel)
{
// [RH] allow very limited movement if not on ground.
movefactor *= level.aircontrol;
bobfactor*= level.aircontrol;
// [AA] but also allow authors to override it.
ApplyAirControl(movefactor, bobfactor);
}
fm = cmd.forwardmove;