mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 17:29:56 +09:00
Set loadable beatmap track to clock immediately in BDL
This reverts commit 84da247002
.
Use loadable beatmap track for clock directly in BDL
This commit is contained in:
@ -144,8 +144,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
// Todo: should probably be done at a DrawableRuleset level to share logic with Player.
|
// Todo: should probably be done at a DrawableRuleset level to share logic with Player.
|
||||||
clock = new EditorClock(playableBeatmap, beatDivisor) { IsCoupled = false };
|
clock = new EditorClock(playableBeatmap, beatDivisor) { IsCoupled = false };
|
||||||
|
clock.ChangeSource(loadableBeatmap.Track);
|
||||||
updateClockSource(loadableBeatmap);
|
|
||||||
|
|
||||||
dependencies.CacheAs(clock);
|
dependencies.CacheAs(clock);
|
||||||
AddInternal(clock);
|
AddInternal(clock);
|
||||||
@ -308,11 +307,9 @@ namespace osu.Game.Screens.Edit
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// If the beatmap's track has changed, this method must be called to keep the editor in a valid state.
|
/// If the beatmap's track has changed, this method must be called to keep the editor in a valid state.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void UpdateClockSource() => updateClockSource(Beatmap.Value);
|
public void UpdateClockSource()
|
||||||
|
|
||||||
private void updateClockSource(WorkingBeatmap beatmap)
|
|
||||||
{
|
{
|
||||||
var sourceClock = (IAdjustableClock)beatmap.Track ?? new StopwatchClock();
|
var sourceClock = (IAdjustableClock)Beatmap.Value.Track ?? new StopwatchClock();
|
||||||
clock.ChangeSource(sourceClock);
|
clock.ChangeSource(sourceClock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user