Show mirrored results for hitcircles

This commit is contained in:
yugecin 2016-09-30 23:51:28 +02:00
parent b1d69cf9f4
commit 4409d538fd

View File

@ -187,8 +187,18 @@ public class Circle extends GameObject {
boolean isAutoMod = GameMod.AUTO.isActive(); boolean isAutoMod = GameMod.AUTO.isActive();
if (trackPosition > time + hitResultOffset[GameData.HIT_50]) { if (trackPosition > time + hitResultOffset[GameData.HIT_50]) {
if (isAutoMod) // "auto" mod: catch any missed notes due to lag if (isAutoMod) {// "auto" mod: catch any missed notes due to lag
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) {
double dx = x - Options.width / 2d;
double dy = y - Options.height / 2d;
double ang = Math.atan2(dy, dx);
double d = -Math.sqrt(dx * dx + dy * dy);
float nx = (float) (Options.width / 2d + Math.cos(ang) * d);
float ny = (float) (Options.height / 2d + Math.sin(ang) * d);
data.hitResult(time, GameData.HIT_300, nx, ny, mirrorColor, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false);
}
}
else // no more points can be scored, so send a miss else // no more points can be scored, so send a miss
data.hitResult(trackPosition, GameData.HIT_MISS, x, y, null, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); data.hitResult(trackPosition, GameData.HIT_MISS, x, y, null, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false);
@ -199,6 +209,15 @@ public class Circle extends GameObject {
else if (isAutoMod) { else if (isAutoMod) {
if (Math.abs(trackPosition - time) < hitResultOffset[GameData.HIT_300]) { if (Math.abs(trackPosition - time) < hitResultOffset[GameData.HIT_300]) {
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) {
double dx = x - Options.width / 2d;
double dy = y - Options.height / 2d;
double ang = Math.atan2(dy, dx);
double d = -Math.sqrt(dx * dx + dy * dy);
float nx = (float) (Options.width / 2d + Math.cos(ang) * d);
float ny = (float) (Options.height / 2d + Math.sin(ang) * d);
data.hitResult(time, GameData.HIT_300, nx, ny, mirrorColor, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false);
}
return true; return true;
} }
} }