Draw cursor location in "auto" mod.
Moves the cursor between hit objects and along hit object paths (slider curves, spinner circles).
- Added 'getPointAt(trackPosition)' and 'getEndTime()' methods to HitObject interface.
- Unhide default cursor for "auto" plays.
Other changes:
- Don't save replays for unranked plays ("auto", "relax", "autopilot" mods).
- For "auto" replays, don't parse replay frames: use default "auto" behavior instead.
- Fixed cursor location data not being reset upon entering states.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -458,6 +458,24 @@ public class Slider implements HitObject {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] getPointAt(int trackPosition) {
|
||||
if (trackPosition <= hitObject.getTime())
|
||||
return new float[] { x, y };
|
||||
else if (trackPosition >= hitObject.getTime() + sliderTimeTotal) {
|
||||
if (hitObject.getRepeatCount() % 2 == 0)
|
||||
return new float[] { x, y };
|
||||
else {
|
||||
int lastIndex = hitObject.getSliderX().length;
|
||||
return new float[] { curve.getX(lastIndex), curve.getY(lastIndex) };
|
||||
}
|
||||
} else
|
||||
return curve.pointAt(getT(trackPosition, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEndTime() { return hitObject.getTime() + (int) sliderTimeTotal; }
|
||||
|
||||
/**
|
||||
* Returns the t value based on the given track position.
|
||||
* @param trackPosition the current track position
|
||||
|
||||
Reference in New Issue
Block a user