mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 09:27:18 +09:00
Don't load player if score has no replay data
This commit is contained in:
parent
059e9e180b
commit
ed67984638
@ -267,15 +267,17 @@ namespace osu.Game
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var databasedBeatmap = BeatmapManager.QueryBeatmap(b => b.ID == score.Beatmap.ID);
|
var score = ScoreManager.GetScore(scoreInfo);
|
||||||
|
if (score.Replay == null)
|
||||||
|
{
|
||||||
|
Logger.Log("The loaded score has no replay data.", LoggingTarget.Information);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var databasedBeatmap = BeatmapManager.QueryBeatmap(b => b.ID == scoreInfo.BeatmapInfo.ID);
|
||||||
if (databasedBeatmap == null)
|
if (databasedBeatmap == null)
|
||||||
{
|
{
|
||||||
notifications.Post(new SimpleNotification
|
Logger.Log("Tried to load a score for a beatmap we don't have!", LoggingTarget.Information);
|
||||||
{
|
|
||||||
Text = @"Tried to load a score for a beatmap we don't have!",
|
|
||||||
Icon = FontAwesome.fa_life_saver,
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,7 +286,7 @@ namespace osu.Game
|
|||||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
|
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
|
||||||
Beatmap.Value.Mods.Value = score.Mods;
|
Beatmap.Value.Mods.Value = score.Mods;
|
||||||
|
|
||||||
menu.Push(new PlayerLoader(new ReplayPlayer(ScoreManager.GetScore(score).Replay)));
|
menu.Push(new PlayerLoader(new ReplayPlayer(score.Replay)));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user