Merge pull request #8129 from peppy/fix-dummy-track-completion-feedback

Fix DummyWorkingBeatmap's track completion attempting to change game-wide beatmap
This commit is contained in:
Dan Balasescu
2020-03-05 17:57:57 +09:00
committed by GitHub
4 changed files with 43 additions and 18 deletions

View File

@ -211,6 +211,10 @@ namespace osu.Game
Audio.Tracks.AddAdjustment(AdjustableProperty.Volume, new BindableDouble(0.8));
Beatmap = new NonNullableBindable<WorkingBeatmap>(defaultBeatmap);
// ScheduleAfterChildren is safety against something in the current frame accessing the previous beatmap's track
// and potentially causing a reload of it after just unloading.
// Note that the reason for this being added *has* been resolved, so it may be feasible to removed this if required.
Beatmap.BindValueChanged(b => ScheduleAfterChildren(() =>
{
// compare to last beatmap as sometimes the two may share a track representation (optimisation, see WorkingBeatmap.TransferTo)