Skip to content

Commit f1b4d21

Browse files
committed
Make it work as intended
confirm-hold anims starts after confirm animation finished
1 parent fd30652 commit f1b4d21

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

source/funkin/play/notes/StrumlineNote.hx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,24 @@ class StrumlineNote extends FunkinSprite
165165

166166
this.confirmHoldTimer = isPlayer ? -1 : Math.max(length, CONFIRM_HOLD_TIME);
167167

168-
holding = true;
168+
if ((getCurrentAnimation() == 'confirm' && isAnimationFinished()) || !gotCorrectConfirmHoldAnimation()) holding = true;
169169

170-
if (animation?.getByName("confirm-hold")?.looped ?? false)
170+
if (holding)
171171
{
172-
this.playAnimation('confirm-hold', false, false);
173-
}
174-
else
175-
{
176-
// Commented out, since it will spam this trace in console on every hold note with default notestlyes lol.
177-
// trace('[WARN] Incorrect data for `confirm-hold` animation!');
172+
if (gotCorrectConfirmHoldAnimation())
173+
{
174+
this.playAnimation('confirm-hold', false, false);
175+
}
176+
else
177+
{
178+
// Commented out, since it will spam this trace in console on every hold note with default notestlyes lol.
179+
// trace('[WARN] Incorrect data for `confirm-hold` animation!');
180+
}
178181
}
179182
}
180183

184+
private inline function gotCorrectConfirmHoldAnimation():Bool
185+
return animation?.getByName("confirm-hold")?.looped ?? false;
181186
/**
182187
* Returns the name of the animation that is currently playing.
183188
* If no animation is playing (usually this means the sprite is BROKEN!),

0 commit comments

Comments
 (0)