diff --git a/OpenRA.Game/Traits/World/Shroud.cs b/OpenRA.Game/Traits/World/Shroud.cs index 76c8bb571d..b0bd57e877 100644 --- a/OpenRA.Game/Traits/World/Shroud.cs +++ b/OpenRA.Game/Traits/World/Shroud.cs @@ -113,6 +113,9 @@ namespace OpenRA.Traits explored[c.X, c.Y] = true; } + if (visibility.ContainsKey(a)) + throw new InvalidOperationException("Attempting to add duplicate actor visibility"); + visibility[a] = visible; Invalidate(); } @@ -147,6 +150,9 @@ namespace OpenRA.Traits foreach (var c in shrouded) generatedShroudCount[c.X, c.Y]++; + if (generation.ContainsKey(a)) + throw new InvalidOperationException("Attempting to add duplicate shroud generation"); + generation[a] = shrouded; Invalidate(); }