put common stuff in utils

This commit is contained in:
yugecin
2016-09-30 23:56:07 +02:00
parent ad370fd8fb
commit 230dd6d98f
4 changed files with 19 additions and 28 deletions

View File

@@ -430,14 +430,9 @@ public class Slider extends GameObject {
cx, cy, color, comboEnd, hitObject, type, sliderHeldToEnd,
currentRepeats + 1, curve, sliderHeldToEnd);
if (Dancer.mirror) {
double dx = cx - Options.width / 2d;
double dy = cy - 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);
float[] m = Utils.mirrorPoint(cx, cy);
data.hitResult(hitObject.getTime() + (int) sliderTimeTotal, result,
nx, ny, mirrorColor, comboEnd, hitObject, type, sliderHeldToEnd,
m[0], m[1], mirrorColor, comboEnd, hitObject, type, sliderHeldToEnd,
currentRepeats + 1, curve, sliderHeldToEnd);
}