don't play the hitsounds twice >.<

This commit is contained in:
yugecin 2016-10-01 00:25:55 +02:00
parent 230dd6d98f
commit 5a899e29cb
3 changed files with 15 additions and 5 deletions

View File

@ -1398,8 +1398,18 @@ public class GameData {
public void hitResult(int time, int result, float x, float y, Color color, public void hitResult(int time, int result, float x, float y, Color color,
boolean end, HitObject hitObject, HitObjectType hitResultType, boolean end, HitObject hitObject, HitObjectType hitResultType,
boolean expand, int repeat, Curve curve, boolean sliderHeldToEnd) { boolean expand, int repeat, Curve curve, boolean sliderHeldToEnd) {
int hitResult = handleHitResult(time, result, x, y, color, end, hitObject, hitResult(time, result, x, y, color, end, hitObject, hitResultType, expand, repeat, curve, sliderHeldToEnd, true);
}
public void hitResult(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) {
int hitResult;
if (handleResult) {
hitResult = handleHitResult(time, result, x, y, color, end, hitObject,
hitResultType, repeat, (curve != null && !sliderHeldToEnd)); hitResultType, repeat, (curve != null && !sliderHeldToEnd));
} else {
hitResult = HIT_300;
}
if (hitResult == HIT_MISS && (GameMod.RELAX.isActive() || GameMod.AUTOPILOT.isActive())) if (hitResult == HIT_MISS && (GameMod.RELAX.isActive() || GameMod.AUTOPILOT.isActive()))
return; // "relax" and "autopilot" mods: hide misses return; // "relax" and "autopilot" mods: hide misses

View File

@ -191,7 +191,7 @@ public class Circle extends GameObject {
data.hitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); data.hitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false);
if (Dancer.mirror) { if (Dancer.mirror) {
float[] m = Utils.mirrorPoint(x, y); float[] m = Utils.mirrorPoint(x, y);
data.hitResult(time, GameData.HIT_300, m[0], m[1], mirrorColor, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); data.hitResult(time, GameData.HIT_300, m[0], m[1], mirrorColor, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false, false);
} }
} }
@ -206,7 +206,7 @@ public class Circle extends GameObject {
data.hitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); data.hitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false);
if (Dancer.mirror) { if (Dancer.mirror) {
float[] m = Utils.mirrorPoint(x, y); float[] m = Utils.mirrorPoint(x, y);
data.hitResult(time, GameData.HIT_300, m[0], m[1], mirrorColor, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); data.hitResult(time, GameData.HIT_300, m[0], m[1], mirrorColor, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false, false);
} }
return true; return true;
} }

View File

@ -433,7 +433,7 @@ public class Slider extends GameObject {
float[] m = Utils.mirrorPoint(cx, cy); float[] m = Utils.mirrorPoint(cx, cy);
data.hitResult(hitObject.getTime() + (int) sliderTimeTotal, result, data.hitResult(hitObject.getTime() + (int) sliderTimeTotal, result,
m[0], m[1], mirrorColor, comboEnd, hitObject, type, sliderHeldToEnd, m[0], m[1], mirrorColor, comboEnd, hitObject, type, sliderHeldToEnd,
currentRepeats + 1, curve, sliderHeldToEnd); currentRepeats + 1, curve, sliderHeldToEnd, false);
} }
return result; return result;