1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 16:52:55 +08:00

Invert if statements.

This commit is contained in:
smoogipooo 2017-05-22 16:56:40 +09:00
parent 07d148f708
commit abe9c464a8

View File

@ -20,14 +20,16 @@ namespace osu.Game.Graphics.Containers
protected override void Update()
{
if (beatmap.Value != null)
{
if (beatmap.Value == null)
return;
double trackCurrentTime = beatmap.Value.Track.CurrentTime;
ControlPoint kiaiControlPoint;
ControlPoint controlPoint = beatmap.Value.Beatmap.TimingInfo.TimingPointAt(trackCurrentTime, out kiaiControlPoint);
if (controlPoint != null)
{
if (controlPoint == null)
return;
double beatLength = controlPoint.BeatLength;
bool kiai = kiaiControlPoint?.KiaiMode ?? false;
double timingPointStart = controlPoint.Time;
@ -42,8 +44,6 @@ namespace osu.Game.Graphics.Containers
lastBeat = beat;
lastTimingPointStart = timingPointStart;
}
}
}
protected virtual void OnNewBeat(int newBeat, double beatLength, TimeSignatures timeSignature, bool kiai)
{