mark as missed when combo exceeds max combo in replay file

This commit is contained in:
yugecin 2017-12-22 12:28:10 +01:00
parent 992ec7afd8
commit 3bccdc5540
2 changed files with 17 additions and 5 deletions

View File

@ -1227,7 +1227,7 @@ public class GameData {
/**
* Increases the combo streak by one.
*/
private void incrementComboStreak() {
protected void incrementComboStreak() {
combo++;
comboPopTime = 0;
if (combo > comboMax)

View File

@ -255,8 +255,8 @@ public class ReplayPlayback {
@Override
public void sendSliderTickResult(int time, int result, float x, float y, HitObject hitObject, int repeat) {
if (result == HIT_MISS) {
if (result == HIT_SLIDER30 || result == HIT_SLIDER10) {
incrementComboStreak();
}
}
@ -267,13 +267,25 @@ public class ReplayPlayback {
@Override
public void sendHitResult(int time, int result, float x, float y, Color color, boolean end, HitObject hitObject, HitObjectType hitResultType, boolean expand, int repeat, Curve curve, boolean sliderHeldToEnd, boolean handleResult) {
if (curve == null || sliderHeldToEnd) {
incrementComboStreak();
}
if (missed || result == HIT_300) {
return;
}
missed = this.getComboStreak() > replay.combo;
if (missed) {
result = HIT_MISS;
}
if (result == HIT_MISS) {
missed = true;
ReplayPlayback.this.color = missedColor;
if (!missed) {
result = HIT_50;
} else {
ReplayPlayback.this.color = missedColor;
}
}
if (result < hitResults.length) {