Use MPos indexer for CellLayer in Shroud.
This reduces us to one conversion per cell rather than two or three.
This commit is contained in:
@@ -128,8 +128,9 @@ namespace OpenRA.Traits
|
||||
|
||||
foreach (var c in visible)
|
||||
{
|
||||
visibleCount[c]++;
|
||||
explored[c] = true;
|
||||
var uv = c.ToMPos(map);
|
||||
visibleCount[uv]++;
|
||||
explored[uv] = true;
|
||||
}
|
||||
|
||||
if (visibility.ContainsKey(a))
|
||||
@@ -146,7 +147,7 @@ namespace OpenRA.Traits
|
||||
return;
|
||||
|
||||
foreach (var c in visible)
|
||||
visibleCount[c]--;
|
||||
visibleCount[c.ToMPos(map)]--;
|
||||
|
||||
visibility.Remove(a);
|
||||
Invalidate(visible);
|
||||
|
||||
Reference in New Issue
Block a user