mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-24 14:16:56 +00:00
Merge pull request #2683 from Hundrec/patch-1
Fix botplay sustain release bug
This commit is contained in:
commit
195663638e
|
@ -2276,11 +2276,20 @@ class PlayState extends MusicBeatSubState
|
|||
if (holdNote == null || !holdNote.alive) continue;
|
||||
|
||||
// While the hold note is being hit, and there is length on the hold note...
|
||||
if (!isBotPlayMode && holdNote.hitNote && !holdNote.missedNote && holdNote.sustainLength > 0)
|
||||
if (holdNote.hitNote && !holdNote.missedNote && holdNote.sustainLength > 0)
|
||||
{
|
||||
// Grant the player health.
|
||||
health += Constants.HEALTH_HOLD_BONUS_PER_SECOND * elapsed;
|
||||
songScore += Std.int(Constants.SCORE_HOLD_BONUS_PER_SECOND * elapsed);
|
||||
if (!isBotPlayMode)
|
||||
{
|
||||
health += Constants.HEALTH_HOLD_BONUS_PER_SECOND * elapsed;
|
||||
songScore += Std.int(Constants.SCORE_HOLD_BONUS_PER_SECOND * elapsed);
|
||||
}
|
||||
|
||||
// Make sure the player keeps singing while the note is held by the bot.
|
||||
if (isBotPlayMode && currentStage != null && currentStage.getBoyfriend() != null && currentStage.getBoyfriend().isSinging())
|
||||
{
|
||||
currentStage.getBoyfriend().holdTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (holdNote.missedNote && !holdNote.handledMiss)
|
||||
|
|
Loading…
Reference in a new issue