1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 22:33:05 +08:00

Mark as non-null because next object in here will always has value.

This commit is contained in:
andy840119 2022-07-02 13:33:51 +08:00
parent 19721a9bbb
commit 59c83a3423
2 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ namespace osu.Game.Rulesets.Mania.Replays
bool canDelayKeyUpFully = nextObject == null ||
nextObject.StartTime > endTime + RELEASE_DELAY;
return endTime + (canDelayKeyUpFully ? RELEASE_DELAY : (nextObject.StartTime - endTime) * 0.9);
return endTime + (canDelayKeyUpFully ? RELEASE_DELAY : (nextObject!.StartTime - endTime) * 0.9);
}
protected override HitObject? GetNextObject(int currentIndex)

View File

@ -117,7 +117,7 @@ namespace osu.Game.Rulesets.Taiko.Replays
var nextHitObject = GetNextObject(i); // Get the next object that requires pressing the same button
bool canDelayKeyUp = nextHitObject == null || nextHitObject.StartTime > endTime + KEY_UP_DELAY;
double calculatedDelay = canDelayKeyUp ? KEY_UP_DELAY : (nextHitObject.StartTime - endTime) * 0.9;
double calculatedDelay = canDelayKeyUp ? KEY_UP_DELAY : (nextHitObject!.StartTime - endTime) * 0.9;
Frames.Add(new TaikoReplayFrame(endTime + calculatedDelay));
hitButton = !hitButton;