mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Merge branch 'master' into custom-ipc-location
This commit is contained in:
@ -36,6 +36,7 @@ namespace osu.Game.Tournament.IPC
|
||||
|
||||
private int lastBeatmapId;
|
||||
private ScheduledDelegate scheduled;
|
||||
private GetBeatmapRequest beatmapLookupRequest;
|
||||
|
||||
public StableInfo StableInfo { get; private set; }
|
||||
|
||||
@ -86,6 +87,8 @@ namespace osu.Game.Tournament.IPC
|
||||
|
||||
if (lastBeatmapId != beatmapId)
|
||||
{
|
||||
beatmapLookupRequest?.Cancel();
|
||||
|
||||
lastBeatmapId = beatmapId;
|
||||
|
||||
var existing = ladder.CurrentMatch.Value?.Round.Value?.Beatmaps.FirstOrDefault(b => b.ID == beatmapId && b.BeatmapInfo != null);
|
||||
@ -94,9 +97,9 @@ namespace osu.Game.Tournament.IPC
|
||||
Beatmap.Value = existing.BeatmapInfo;
|
||||
else
|
||||
{
|
||||
var req = new GetBeatmapRequest(new BeatmapInfo { OnlineBeatmapID = beatmapId });
|
||||
req.Success += b => Beatmap.Value = b.ToBeatmap(Rulesets);
|
||||
API.Queue(req);
|
||||
beatmapLookupRequest = new GetBeatmapRequest(new BeatmapInfo { OnlineBeatmapID = beatmapId });
|
||||
beatmapLookupRequest.Success += b => Beatmap.Value = b.ToBeatmap(Rulesets);
|
||||
API.Queue(beatmapLookupRequest);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user