Fix selecting "IAHN - Transform [Aspire]" map crashing the game (#5)

This commit is contained in:
yugecin 2016-10-01 21:21:33 +02:00
parent f99fd7a003
commit 3a30087929

View File

@ -109,6 +109,11 @@ public abstract class EqualDistanceMultiCurve extends Curve {
// if (hitObject.getRepeatCount() > 1) {
Vec2f c1 = curve[0];
int cnt = 1;
if (cnt > ncurve) {
return; // TODO this prevents aspire map from crashing the game, but does it breaks stuff?
}
Vec2f c2 = curve[cnt++];
while (cnt <= ncurve && c2.cpy().sub(c1).len() < 1)
c2 = curve[cnt++];