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:
RoosterDragon
2015-03-23 23:23:01 +00:00
parent 1584018dcd
commit 1853ddde94

View File

@@ -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);