mirror of
https://github.com/ppy/osu
synced 2025-01-05 21:59:46 +00:00
Replace spectator-local fix for wrong ruleset ID with player-global consistency check
This commit is contained in:
parent
b34086a792
commit
874decb3cd
@ -144,9 +144,9 @@ namespace osu.Game.Online.Spectator
|
||||
IsPlaying = true;
|
||||
|
||||
// transfer state at point of beginning play
|
||||
currentState.BeatmapID = state.Beatmap.BeatmapInfo.OnlineBeatmapID;
|
||||
currentState.RulesetID = state.Ruleset.RulesetInfo.ID;
|
||||
currentState.Mods = state.Mods.Select(m => new APIMod(m)).ToArray();
|
||||
currentState.BeatmapID = score.ScoreInfo.BeatmapInfo.OnlineBeatmapID;
|
||||
currentState.RulesetID = score.ScoreInfo.RulesetID;
|
||||
currentState.Mods = score.ScoreInfo.Mods.Select(m => new APIMod(m)).ToArray();
|
||||
|
||||
currentBeatmap = state.Beatmap;
|
||||
currentScore = score;
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
@ -217,9 +218,12 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
Score = CreateScore(playableBeatmap);
|
||||
|
||||
Debug.Assert(ruleset.RulesetInfo.ID != null);
|
||||
|
||||
// ensure the score is in a consistent state with the current player.
|
||||
Score.ScoreInfo.BeatmapInfo = Beatmap.Value.BeatmapInfo;
|
||||
Score.ScoreInfo.Ruleset = ruleset.RulesetInfo;
|
||||
Score.ScoreInfo.RulesetID = ruleset.RulesetInfo.ID.Value;
|
||||
Score.ScoreInfo.Mods = gameplayMods;
|
||||
|
||||
dependencies.CacheAs(GameplayState = new GameplayState(playableBeatmap, ruleset, gameplayMods, Score));
|
||||
|
Loading…
Reference in New Issue
Block a user