From 8a01fc1bffa8c323da188aaa50a19c446ce2f61b Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Mon, 17 Sep 2018 20:31:50 +0200 Subject: [PATCH] Make random in blinds mod the same every replay --- .../Objects/Drawables/DrawableOsuBlinds.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuBlinds.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuBlinds.cs index 4fe5b4e4fb..15d394dbb4 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuBlinds.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuBlinds.cs @@ -121,8 +121,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables Depth = fg_panel_depth }); - - random = new Random(); + // seed with unique seed per map so NPC always comes from the same sides for a same map for reproducible replays. + random = new Random(beatmap.Metadata.ToString().GetHashCode()); Add(bgRandomNpc = new Box { Anchor = Anchor.Centre, @@ -133,7 +133,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables RelativePositionAxes = Axes.Y, X = -512, Y = 0, - Depth = black_depth + Depth = black_depth, + Alpha = 0 }); Add(new SkinnableDrawable("Play/Catch/fruit-catcher-idle", name => randomNpc = new Sprite { @@ -144,7 +145,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables Height = 512, RelativePositionAxes = Axes.Y, X = -512, - Y = 0 + Y = 0, + Alpha = 0 }) { Depth = npc_depth });