mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +08:00
Add explanatory comments + const
This commit is contained in:
parent
be9b07a4cf
commit
20a6405fd2
@ -110,8 +110,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
||||
double startTime = start.GetEndTime();
|
||||
double duration = end.StartTime - startTime;
|
||||
|
||||
// For now, adjust the pre-empt for approach rates > 10.
|
||||
double preempt = PREEMPT * Math.Min(1, start.TimePreempt / 450);
|
||||
// Preempt time can go below 800ms. Normally, this is achieved via the DT mod which uniformly speeds up all animations game wide regardless of AR.
|
||||
// This uniform speedup is hard to match 1:1, however we can at least make AR>10 (via mods) feel good by extending the upper linear preempt function (see: OsuHitObject).
|
||||
// Note that this doesn't exactly match the AR>10 visuals as they're classically known, but it feels good.
|
||||
double preempt = PREEMPT * Math.Min(1, start.TimePreempt / OsuHitObject.PREEMPT_MIN);
|
||||
|
||||
fadeOutTime = startTime + fraction * duration;
|
||||
fadeInTime = fadeOutTime - preempt;
|
||||
|
@ -26,6 +26,11 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
/// </summary>
|
||||
internal const float BASE_SCORING_DISTANCE = 100;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum preempt time at AR=10.
|
||||
/// </summary>
|
||||
public const double PREEMPT_MIN = 450;
|
||||
|
||||
public double TimePreempt = 600;
|
||||
public double TimeFadeIn = 400;
|
||||
|
||||
@ -113,8 +118,13 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
{
|
||||
base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
||||
|
||||
TimePreempt = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1800, 1200, 450);
|
||||
TimeFadeIn = 400 * Math.Min(1, TimePreempt / 450);
|
||||
TimePreempt = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1800, 1200, PREEMPT_MIN);
|
||||
|
||||
// Preempt time can go below 450ms. Normally, this is achieved via the DT mod which uniformly speeds up all animations game wide regardless of AR.
|
||||
// This uniform speedup is hard to match 1:1, however we can at least make AR>10 (via mods) feel good by extending the upper linear function above.
|
||||
// Note that this doesn't exactly match the AR>10 visuals as they're classically known, but it feels good.
|
||||
// This adjustment is necessary for AR>10, otherwise TimePreempt can become smaller leading to hitcircles not fully fading in.
|
||||
TimeFadeIn = 400 * Math.Min(1, TimePreempt / PREEMPT_MIN);
|
||||
|
||||
Scale = (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5) / 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user