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. * Increases the combo streak by one.
*/ */
private void incrementComboStreak() { protected void incrementComboStreak() {
combo++; combo++;
comboPopTime = 0; comboPopTime = 0;
if (combo > comboMax) if (combo > comboMax)

View File

@ -255,8 +255,8 @@ public class ReplayPlayback {
@Override @Override
public void sendSliderTickResult(int time, int result, float x, float y, HitObject hitObject, int repeat) { 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 @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) { 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) { if (missed || result == HIT_300) {
return; return;
} }
missed = this.getComboStreak() > replay.combo;
if (missed) {
result = HIT_MISS;
}
if (result == HIT_MISS) { if (result == HIT_MISS) {
missed = true; if (!missed) {
ReplayPlayback.this.color = missedColor; result = HIT_50;
} else {
ReplayPlayback.this.color = missedColor;
}
} }
if (result < hitResults.length) { if (result < hitResults.length) {