From 3bccdc5540d51c47e2c7dd3e267014ce1cb48970 Mon Sep 17 00:00:00 2001 From: yugecin Date: Fri, 22 Dec 2017 12:28:10 +0100 Subject: [PATCH] mark as missed when combo exceeds max combo in replay file --- src/itdelatrisu/opsu/GameData.java | 2 +- src/yugecin/opsudance/ReplayPlayback.java | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/itdelatrisu/opsu/GameData.java b/src/itdelatrisu/opsu/GameData.java index 96e35cd6..91bd7b4e 100644 --- a/src/itdelatrisu/opsu/GameData.java +++ b/src/itdelatrisu/opsu/GameData.java @@ -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) diff --git a/src/yugecin/opsudance/ReplayPlayback.java b/src/yugecin/opsudance/ReplayPlayback.java index ba0df903..58794f94 100644 --- a/src/yugecin/opsudance/ReplayPlayback.java +++ b/src/yugecin/opsudance/ReplayPlayback.java @@ -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) {