From cd82382f6803c13a92a498b0cd53e999d2356ad1 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sun, 4 Nov 2018 18:06:51 +0100 Subject: [PATCH] Change CreateEffectWarhead to use World.LocalRandom --- OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs index dec8a701c1..8fc8e397c0 100644 --- a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs +++ b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs @@ -119,7 +119,7 @@ namespace OpenRA.Mods.Common.Warheads if (UsePlayerPalette) palette += firedBy.Owner.InternalName; - var explosion = Explosions.RandomOrDefault(Game.CosmeticRandom); + var explosion = Explosions.RandomOrDefault(world.LocalRandom); if (Image != null && explosion != null) { if (ForceDisplayAtGroundLevel) @@ -131,8 +131,8 @@ namespace OpenRA.Mods.Common.Warheads world.AddFrameEndTask(w => w.Add(new SpriteEffect(pos, w, Image, explosion, palette))); } - var impactSound = ImpactSounds.RandomOrDefault(Game.CosmeticRandom); - if (impactSound != null && Game.CosmeticRandom.Next(0, 100) < ImpactSoundChance) + var impactSound = ImpactSounds.RandomOrDefault(world.LocalRandom); + if (impactSound != null && world.LocalRandom.Next(0, 100) < ImpactSoundChance) Game.Sound.Play(SoundType.World, impactSound, pos); }