update SliderTick calculation + more ticks in tests

math is hard >_<
This commit is contained in:
Aergwyn
2018-01-29 12:03:22 +01:00
parent 8425f3ee93
commit 373b3871f9
3 changed files with 16 additions and 5 deletions

View File

@ -9,14 +9,22 @@ namespace osu.Game.Rulesets.Osu.Objects
public class SliderTick : OsuHitObject
{
public int SpanIndex { get; set; }
public double SliderStartTime { get; set; }
public double SpanStartTime { get; set; }
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
{
base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
// SliderTicks appear earlier and earlier going further into a Slider.
TimePreempt = StartTime - ((StartTime - SliderStartTime) / 2 + SliderStartTime - TimeFadein * 0.66f);
double offset;
if (SpanIndex > 0)
// Adding 200 to include the offset stable used.
// This is so on repeats ticks don't appear too late to be visually processed by the player.
offset = 200;
else
offset = TimeFadein * 0.66f;
TimePreempt = (StartTime - SpanStartTime) / 2 + offset;
}
}
}