mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 11:23:00 +08:00
Inline const
This commit is contained in:
parent
273b14b19c
commit
3fa5a33fb1
@ -24,12 +24,6 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
/// </summary>
|
||||
private const float base_scoring_distance = 100;
|
||||
|
||||
/// <summary>
|
||||
/// A very lenient maximum length of a slider for ticks to be generated.
|
||||
/// This exists for edge cases such as /b/1573664 where the beatmap has been edited by the user, and should never be reached in normal usage.
|
||||
/// </summary>
|
||||
private const double max_length_for_ticks = 100000;
|
||||
|
||||
public double EndTime => StartTime + this.SpanCount() * Path.Distance / Velocity;
|
||||
public double Duration => EndTime - StartTime;
|
||||
|
||||
@ -195,7 +189,11 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
|
||||
private void createTicks()
|
||||
{
|
||||
var length = Math.Min(max_length_for_ticks, Path.Distance);
|
||||
// A very lenient maximum length of a slider for ticks to be generated.
|
||||
// This exists for edge cases such as /b/1573664 where the beatmap has been edited by the user, and should never be reached in normal usage.
|
||||
const double max_length = 100000;
|
||||
|
||||
var length = Math.Min(max_length, Path.Distance);
|
||||
var tickDistance = MathHelper.Clamp(TickDistance, 0, length);
|
||||
|
||||
if (tickDistance == 0) return;
|
||||
|
Loading…
Reference in New Issue
Block a user