Merge branch 'hitresults'

This commit is contained in:
yugecin 2016-10-01 00:26:02 +02:00
commit 6788cd84d8
3 changed files with 15 additions and 5 deletions

View File

@ -1395,11 +1395,21 @@ public class GameData {
* @param curve the slider curve (or null if not applicable) * @param curve the slider curve (or null if not applicable)
* @param sliderHeldToEnd whether or not the slider was held to the end (if applicable) * @param sliderHeldToEnd whether or not the slider was held to the end (if applicable)
*/ */
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) {
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, 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, boolean handleResult) {
int hitResult = handleHitResult(time, result, x, y, color, end, hitObject, 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;