1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 04:03:22 +08:00

Make FramedBeatmapClock.Track non-null

This commit is contained in:
Dean Herbert 2022-08-22 14:02:41 +09:00
parent 85d0b7fc57
commit ba23ce75c2

View File

@ -31,12 +31,12 @@ namespace osu.Game.Beatmaps
/// <summary> /// <summary>
/// The length of the underlying beatmap track. Will default to 60 seconds if unavailable. /// The length of the underlying beatmap track. Will default to 60 seconds if unavailable.
/// </summary> /// </summary>
public double TrackLength => Track?.Length ?? 60000; public double TrackLength => Track.Length;
/// <summary> /// <summary>
/// The underlying beatmap track, if available. /// The underlying beatmap track, if available.
/// </summary> /// </summary>
public Track? Track { get; private set; } // TODO: virtual rather than null? public Track Track { get; private set; } = new TrackVirtual(60000);
/// <summary> /// <summary>
/// The total frequency adjustment from pause transforms. Should eventually be handled in a better way. /// The total frequency adjustment from pause transforms. Should eventually be handled in a better way.
@ -144,7 +144,7 @@ namespace osu.Game.Beatmaps
public void ChangeSource(IClock? source) public void ChangeSource(IClock? source)
{ {
Track = source as Track; Track = source as Track ?? new TrackVirtual(60000);
decoupledClock.ChangeSource(source); decoupledClock.ChangeSource(source);
} }