mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Fix post-rebase issues
This commit is contained in:
parent
a8ad7d4670
commit
a6b0e35b2d
@ -263,18 +263,26 @@ namespace osu.Game
|
||||
return;
|
||||
}
|
||||
|
||||
var score = ScoreManager.GetScore(scoreInfo);
|
||||
if (score.Replay == null)
|
||||
var databasedScore = ScoreManager.GetScore(score);
|
||||
var databasedScoreInfo = databasedScore.ScoreInfo;
|
||||
if (databasedScore.Replay == null)
|
||||
{
|
||||
Logger.Log("The loaded score has no replay data.", LoggingTarget.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
var databasedBeatmap = BeatmapManager.QueryBeatmap(b => b.ID == databasedScoreInfo.Beatmap.ID);
|
||||
if (databasedBeatmap == null)
|
||||
{
|
||||
Logger.Log("Tried to load a score for a beatmap we don't have!", LoggingTarget.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!currentScreen.AllowExternalScreenChange)
|
||||
{
|
||||
notifications.Post(new SimpleNotification
|
||||
{
|
||||
Text = $"Click here to watch {scoreInfo.User.Username} on {scoreInfo.BeatmapInfo}",
|
||||
Text = $"Click here to watch {databasedScoreInfo.User.Username} on {databasedScoreInfo.Beatmap}",
|
||||
Activated = () =>
|
||||
{
|
||||
loadScore();
|
||||
@ -296,19 +304,12 @@ namespace osu.Game
|
||||
return;
|
||||
}
|
||||
|
||||
var databasedBeatmap = BeatmapManager.QueryBeatmap(b => b.ID == scoreInfo.BeatmapInfo.ID);
|
||||
if (databasedBeatmap == null)
|
||||
{
|
||||
Logger.Log("Tried to load a score for a beatmap we don't have!", LoggingTarget.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
ruleset.Value = score.Ruleset;
|
||||
ruleset.Value = databasedScoreInfo.Ruleset;
|
||||
|
||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
|
||||
Beatmap.Value.Mods.Value = score.Mods;
|
||||
Beatmap.Value.Mods.Value = databasedScoreInfo.Mods;
|
||||
|
||||
currentScreen.Push(new PlayerLoader(new ReplayPlayer(score)));
|
||||
currentScreen.Push(new PlayerLoader(new ReplayPlayer(databasedScore)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -291,7 +291,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
var score = new ScoreInfo
|
||||
{
|
||||
BeatmapInfo = Beatmap.Value.BeatmapInfo,
|
||||
Beatmap = Beatmap.Value.BeatmapInfo,
|
||||
Ruleset = ruleset,
|
||||
User = api.LocalUser.Value
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user