1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +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()
{
var autoplayMod = Mods.Value.OfType<ModAutoplay>().FirstOrDefault();
if (autoplayMod != null)
return new ReplayPlayer((beatmap, mods) => autoplayMod.CreateReplayScore(beatmap, mods));
var replayGeneratingMod = Mods.Value.OfType<ICreateReplay>().FirstOrDefault();
if (replayGeneratingMod != null)
return new ReplayPlayer((beatmap, mods) => replayGeneratingMod.CreateReplayScore(beatmap, mods));
return new SoloPlayer();
}