1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 11:27:24 +08:00

Create replay via the ICreateReplay interface instead of explicitly ModAutoplay

This commit is contained in:
Dean Herbert 2021-06-01 14:22:16 +09:00
parent 9221213fe5
commit cbf3ef5400

View File

@ -111,9 +111,9 @@ namespace osu.Game.Screens.Select
Player createPlayer() Player createPlayer()
{ {
var autoplayMod = Mods.Value.OfType<ModAutoplay>().FirstOrDefault(); var replayGeneratingMod = Mods.Value.OfType<ICreateReplay>().FirstOrDefault();
if (autoplayMod != null) if (replayGeneratingMod != null)
return new ReplayPlayer((beatmap, mods) => autoplayMod.CreateReplayScore(beatmap, mods)); return new ReplayPlayer((beatmap, mods) => replayGeneratingMod.CreateReplayScore(beatmap, mods));
return new SoloPlayer(); return new SoloPlayer();
} }