Skip to content

Commit

Permalink
[Sonic Frontiers] Recovery Jump into Flight
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperbx committed Nov 11, 2023
1 parent 40802d3 commit f4b5612
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Code "Recovery Jump into Flight" in "Gameplay/Skills/Tails" by "Hyper" does "Allows Tails to instantly start flying after jumping when flinging off terrain whilst holding the jump button."
//
#lib "Player"
#lib "Time"

static float _recoveryJumpTimer = 0.0f;
//
{
if (Player.GetPlayerType() != Player.PlayerType.Tails)
return;

if (Player.State.GetCurrentStateID<Tails.StateID>() == Tails.StateID.StateRecoveryJump)
{
if (_recoveryJumpTimer > 0.65f && Player.Input.IsDown(Player.InputActionType.PlayerJump))
{
Player.State.SetState<Tails.StateID>(Tails.StateID.StateTailsFly);
_recoveryJumpTimer = 0.0f;
}

_recoveryJumpTimer += Time.GetDeltaTime();
}
}

0 comments on commit f4b5612

Please sign in to comment.