mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 13:50:48 +00:00
Add ApplyAirControl
This commit is contained in:
parent
7c93cfa97b
commit
0055042112
1 changed files with 8 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue