mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Make FramedBeatmapClock.Track
non-null
This commit is contained in:
parent
85d0b7fc57
commit
ba23ce75c2
@ -31,12 +31,12 @@ namespace osu.Game.Beatmaps
|
||||
/// <summary>
|
||||
/// The length of the underlying beatmap track. Will default to 60 seconds if unavailable.
|
||||
/// </summary>
|
||||
public double TrackLength => Track?.Length ?? 60000;
|
||||
public double TrackLength => Track.Length;
|
||||
|
||||
/// <summary>
|
||||
/// The underlying beatmap track, if available.
|
||||
/// </summary>
|
||||
public Track? Track { get; private set; } // TODO: virtual rather than null?
|
||||
public Track Track { get; private set; } = new TrackVirtual(60000);
|
||||
|
||||
/// <summary>
|
||||
/// 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)
|
||||
{
|
||||
Track = source as Track;
|
||||
Track = source as Track ?? new TrackVirtual(60000);
|
||||
decoupledClock.ChangeSource(source);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user