Add an extra sanity check.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user