mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 11:12:54 +08:00
Fix initial state transfer regressing
This commit is contained in:
parent
b87327841d
commit
04c243386b
@ -29,18 +29,6 @@ namespace osu.Game.Online.Rooms
|
|||||||
|
|
||||||
private ScheduledDelegate progressUpdate;
|
private ScheduledDelegate progressUpdate;
|
||||||
|
|
||||||
public OnlinePlayBeatmapAvailablilityTracker()
|
|
||||||
{
|
|
||||||
State.BindValueChanged(_ => updateAvailability());
|
|
||||||
Progress.BindValueChanged(_ =>
|
|
||||||
{
|
|
||||||
// incoming progress changes are going to be at a very high rate.
|
|
||||||
// we don't want to flood the network with this, so rate limit how often we send progress updates.
|
|
||||||
if (progressUpdate?.Completed != false)
|
|
||||||
progressUpdate = Scheduler.AddDelayed(updateAvailability, progressUpdate == null ? 0 : 500);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
@ -54,6 +42,16 @@ namespace osu.Game.Online.Rooms
|
|||||||
|
|
||||||
Model.Value = item.NewValue.Beatmap.Value.BeatmapSet;
|
Model.Value = item.NewValue.Beatmap.Value.BeatmapSet;
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
Progress.BindValueChanged(_ =>
|
||||||
|
{
|
||||||
|
// incoming progress changes are going to be at a very high rate.
|
||||||
|
// we don't want to flood the network with this, so rate limit how often we send progress updates.
|
||||||
|
if (progressUpdate?.Completed != false)
|
||||||
|
progressUpdate = Scheduler.AddDelayed(updateAvailability, progressUpdate == null ? 0 : 500);
|
||||||
|
});
|
||||||
|
|
||||||
|
State.BindValueChanged(_ => updateAvailability(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool VerifyDatabasedModel(BeatmapSetInfo databasedSet)
|
protected override bool VerifyDatabasedModel(BeatmapSetInfo databasedSet)
|
||||||
|
Loading…
Reference in New Issue
Block a user