fix slider leftovers being drawn

This commit is contained in:
yugecin 2016-12-03 20:13:58 +01:00
parent 8f9f16de98
commit 06445e59c4
3 changed files with 7 additions and 5 deletions

View File

@ -913,7 +913,7 @@ public class GameData {
float oldColorAlpha = hitResult.color.a;
Colors.WHITE_FADE.a = alpha;
hitResult.color.a = alpha;
hitResult.curve.draw(hitResult.color);
//hitResult.curve.draw(hitResult.color);
Colors.WHITE_FADE.a = oldWhiteAlpha;
hitResult.color.a = oldColorAlpha;
}

View File

@ -557,6 +557,7 @@ public class Slider extends GameObject {
// calculate and send slider result
hitResult();
game.setSlidercurveFrom(baseSliderFrom + curve.getCurvePoints().length);
return true;
}

View File

@ -280,13 +280,14 @@ public class CurveRenderState {
float last_y = curve[i - 1].y;
double diff_x = x - last_x;
double diff_y = y - last_y;
if (diff_x < Circle.diameter / 8 && diff_y < Circle.diameter / 8) {
float dist = Utils.distance(x, y, last_x, last_y);
if (dist < Circle.diameter / 8) {
x = (float) (x - diff_x / 2);
y = (float) (y - diff_y / 2);
} else {
x = curve[i+1].x;
y = curve[i+1].y;
System.out.println("next");
// don't mind me
x = -100f;
y = -100f;
}
fillCone(buff, x, y);
}