Skip to content

Commit

Permalink
[Sonic Frontiers] Rail Dash: fix missing effect when homing from rails
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperbx committed Oct 13, 2024
1 parent 5c20b00 commit 8da3d84
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Source/Sonic Frontiers/Gameplay/Skills/Rail Dash.hmm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Notes;

static bool _isInitialised = false;
static bool _isPowerBoostEffectsHidden = false;
static bool _isHomingFromGrind = false;
static bool _isDashCharged = false;
static bool _isSpinBoostAnimThresholdReached = false;
static bool _isLandAnimThresholdReached = false;
Expand Down Expand Up @@ -137,6 +138,18 @@ Notes;
{
_isDashCharged = false;
}

if (state == Sonic.StateID.StateHomingAttack && statePrev == Sonic.StateID.StateGrind)
{
Player.Effect.PlayAnimationEffect("SPIN");
_isHomingFromGrind = true;
return;
}
else if (_isHomingFromGrind && state != Sonic.StateID.StateHomingAttack)
{
Player.Effect.StopAnimationEffects();
_isHomingFromGrind = false;
}

// Allow spin dashing on rails.
if (!_isDashCharged && isGrind && isSpinDashPressed)
Expand Down

0 comments on commit 8da3d84

Please sign in to comment.