Add an extra sanity check.
This commit is contained in:
@@ -113,6 +113,9 @@ namespace OpenRA.Traits
|
|||||||
explored[c.X, c.Y] = true;
|
explored[c.X, c.Y] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (visibility.ContainsKey(a))
|
||||||
|
throw new InvalidOperationException("Attempting to add duplicate actor visibility");
|
||||||
|
|
||||||
visibility[a] = visible;
|
visibility[a] = visible;
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
@@ -147,6 +150,9 @@ namespace OpenRA.Traits
|
|||||||
foreach (var c in shrouded)
|
foreach (var c in shrouded)
|
||||||
generatedShroudCount[c.X, c.Y]++;
|
generatedShroudCount[c.X, c.Y]++;
|
||||||
|
|
||||||
|
if (generation.ContainsKey(a))
|
||||||
|
throw new InvalidOperationException("Attempting to add duplicate shroud generation");
|
||||||
|
|
||||||
generation[a] = shrouded;
|
generation[a] = shrouded;
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user