mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:15:45 +08:00
Move constant for default ControlPoint out of Slider.
This commit is contained in:
parent
bf33cc6f53
commit
94dd268fd2
@ -57,10 +57,10 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
ControlPoint overridePoint;
|
||||
ControlPoint timingPoint = beatmap.TimingPointAt(StartTime, out overridePoint);
|
||||
var velocityAdjustment = overridePoint?.VelocityAdjustment ?? 1;
|
||||
var baseVelocity = 100 * baseDifficulty.SliderMultiplier;
|
||||
var baseVelocity = 100 * baseDifficulty.SliderMultiplier / velocityAdjustment;
|
||||
|
||||
Velocity = baseVelocity / ((timingPoint?.BeatLength ?? 500) * velocityAdjustment);
|
||||
TickDistance = baseVelocity / (baseDifficulty.SliderTickRate * velocityAdjustment);
|
||||
Velocity = baseVelocity / timingPoint.BeatLength;
|
||||
TickDistance = baseVelocity / baseDifficulty.SliderTickRate;
|
||||
}
|
||||
|
||||
public int RepeatCount = 1;
|
||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Beatmaps
|
||||
else break;
|
||||
}
|
||||
|
||||
return timingPoint;
|
||||
return timingPoint ?? ControlPoint.Default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +1,21 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.Beatmaps.Timing
|
||||
{
|
||||
public class ControlPoint
|
||||
{
|
||||
public static ControlPoint Default = new ControlPoint
|
||||
{
|
||||
BeatLength = 500,
|
||||
TimingChange = true,
|
||||
};
|
||||
|
||||
public double Time;
|
||||
public double BeatLength;
|
||||
public double VelocityAdjustment;
|
||||
public bool TimingChange;
|
||||
|
||||
}
|
||||
|
||||
internal enum TimeSignatures
|
||||
|
Loading…
Reference in New Issue
Block a user