Fix incorrect beatmap being parsed down for autoplay generation

This commit is contained in:
Dean Herbert 2021-06-01 15:44:24 +09:00
parent 240f7facba
commit 3ba0d29108
1 changed files with 4 additions and 3 deletions

View File

@ -6,6 +6,7 @@
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Input.Bindings;
using osu.Game.Beatmaps;
using osu.Game.Input.Bindings;
using osu.Game.Rulesets.Mods;
using osu.Game.Scoring;
@ -17,7 +18,7 @@ public class ReplayPlayer : Player, IKeyBindingHandler<GlobalAction>
{
protected Score Score { get; private set; }
private readonly Func<GameplayBeatmap, IReadOnlyList<Mod>, Score> createScore;
private readonly Func<IBeatmap, IReadOnlyList<Mod>, Score> createScore;
// Disallow replays from failing. (see https://github.com/ppy/osu/issues/6108)
protected override bool CheckModsAllowFailure() => false;
@ -27,7 +28,7 @@ public ReplayPlayer(Score score, PlayerConfiguration configuration = null)
{
}
public ReplayPlayer(Func<GameplayBeatmap, IReadOnlyList<Mod>, Score> createScore, PlayerConfiguration configuration = null)
public ReplayPlayer(Func<IBeatmap, IReadOnlyList<Mod>, Score> createScore, PlayerConfiguration configuration = null)
: base(configuration)
{
this.createScore = createScore;
@ -38,7 +39,7 @@ private void load()
{
if (!LoadedBeatmapSuccessfully) return;
Score = createScore(GameplayBeatmap, Mods.Value);
Score = createScore(GameplayBeatmap.PlayableBeatmap, Mods.Value);
}
protected override void PrepareReplay()