mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-28 07:07:16 +00:00
Merge pull request #434 from FunkinCrew/bugfix/combo-fixes
Bugfix/combo fixes
This commit is contained in:
commit
5ee550afb1
|
|
@ -2441,7 +2441,8 @@ class PlayState extends MusicBeatSubState
|
||||||
if (Highscore.tallies.combo != 0)
|
if (Highscore.tallies.combo != 0)
|
||||||
{
|
{
|
||||||
// Break the combo.
|
// Break the combo.
|
||||||
Highscore.tallies.combo = comboPopUps.displayCombo(0);
|
if (Highscore.tallies.combo >= 10) comboPopUps.displayCombo(0);
|
||||||
|
Highscore.tallies.combo = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playSound)
|
if (playSound)
|
||||||
|
|
@ -2568,32 +2569,38 @@ class PlayState extends MusicBeatSubState
|
||||||
*/
|
*/
|
||||||
function popUpScore(daNote:NoteSprite, score:Int, daRating:String, healthChange:Float):Void
|
function popUpScore(daNote:NoteSprite, score:Int, daRating:String, healthChange:Float):Void
|
||||||
{
|
{
|
||||||
vocals.playerVolume = 1;
|
|
||||||
|
|
||||||
if (daRating == 'miss')
|
if (daRating == 'miss')
|
||||||
{
|
{
|
||||||
// If daRating is 'miss', that means we made a mistake and should not continue.
|
// If daRating is 'miss', that means we made a mistake and should not continue.
|
||||||
trace('[WARNING] popUpScore judged a note as a miss!');
|
FlxG.log.warn('popUpScore judged a note as a miss!');
|
||||||
// TODO: Remove this.
|
// TODO: Remove this.
|
||||||
comboPopUps.displayRating('miss');
|
comboPopUps.displayRating('miss');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vocals.playerVolume = 1;
|
||||||
|
|
||||||
var isComboBreak = false;
|
var isComboBreak = false;
|
||||||
switch (daRating)
|
switch (daRating)
|
||||||
{
|
{
|
||||||
case 'sick':
|
case 'sick':
|
||||||
Highscore.tallies.sick += 1;
|
Highscore.tallies.sick += 1;
|
||||||
|
Highscore.tallies.totalNotesHit++;
|
||||||
isComboBreak = Constants.JUDGEMENT_SICK_COMBO_BREAK;
|
isComboBreak = Constants.JUDGEMENT_SICK_COMBO_BREAK;
|
||||||
case 'good':
|
case 'good':
|
||||||
Highscore.tallies.good += 1;
|
Highscore.tallies.good += 1;
|
||||||
|
Highscore.tallies.totalNotesHit++;
|
||||||
isComboBreak = Constants.JUDGEMENT_GOOD_COMBO_BREAK;
|
isComboBreak = Constants.JUDGEMENT_GOOD_COMBO_BREAK;
|
||||||
case 'bad':
|
case 'bad':
|
||||||
Highscore.tallies.bad += 1;
|
Highscore.tallies.bad += 1;
|
||||||
|
Highscore.tallies.totalNotesHit++;
|
||||||
isComboBreak = Constants.JUDGEMENT_BAD_COMBO_BREAK;
|
isComboBreak = Constants.JUDGEMENT_BAD_COMBO_BREAK;
|
||||||
case 'shit':
|
case 'shit':
|
||||||
Highscore.tallies.shit += 1;
|
Highscore.tallies.shit += 1;
|
||||||
|
Highscore.tallies.totalNotesHit++;
|
||||||
isComboBreak = Constants.JUDGEMENT_SHIT_COMBO_BREAK;
|
isComboBreak = Constants.JUDGEMENT_SHIT_COMBO_BREAK;
|
||||||
|
default:
|
||||||
|
FlxG.log.error('Wuh? Buh? Guh? Note hit judgement was $daRating!');
|
||||||
}
|
}
|
||||||
|
|
||||||
health += healthChange;
|
health += healthChange;
|
||||||
|
|
@ -2601,18 +2608,18 @@ class PlayState extends MusicBeatSubState
|
||||||
if (isComboBreak)
|
if (isComboBreak)
|
||||||
{
|
{
|
||||||
// Break the combo, but don't increment tallies.misses.
|
// Break the combo, but don't increment tallies.misses.
|
||||||
Highscore.tallies.combo = comboPopUps.displayCombo(0);
|
if (Highscore.tallies.combo >= 10) comboPopUps.displayCombo(0);
|
||||||
|
Highscore.tallies.combo = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Highscore.tallies.combo++;
|
Highscore.tallies.combo++;
|
||||||
Highscore.tallies.totalNotesHit++;
|
|
||||||
if (Highscore.tallies.combo > Highscore.tallies.maxCombo) Highscore.tallies.maxCombo = Highscore.tallies.combo;
|
if (Highscore.tallies.combo > Highscore.tallies.maxCombo) Highscore.tallies.maxCombo = Highscore.tallies.combo;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStrumline.hitNote(daNote, !isComboBreak);
|
playerStrumline.hitNote(daNote, !isComboBreak);
|
||||||
|
|
||||||
if (daRating == "sick")
|
if (daRating == 'sick')
|
||||||
{
|
{
|
||||||
playerStrumline.playNoteSplash(daNote.noteData.getDirection());
|
playerStrumline.playNoteSplash(daNote.noteData.getDirection());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue