1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00

Move constant for default ControlPoint out of Slider.

This commit is contained in:
Dean Herbert 2017-02-18 15:54:16 +09:00
parent bf33cc6f53
commit 94dd268fd2
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
3 changed files with 11 additions and 10 deletions

View File

@ -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;

View File

@ -55,7 +55,7 @@ namespace osu.Game.Beatmaps
else break;
}
return timingPoint;
return timingPoint ?? ControlPoint.Default;
}
}
}

View File

@ -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