Fix shroud crash

This commit is contained in:
Paul Chote
2010-12-01 18:22:46 +13:00
parent deed6c7267
commit 971287e989

View File

@@ -216,6 +216,11 @@ namespace OpenRA.Traits
if (Disabled)
return true;
// Visibility is allowed to extend beyond the map cordon so that
// the fog tiles are not visible at the edge of the world
if (x < 0 || x >= map.MapSize.X || y < 0 || y >= map.MapSize.Y)
return false;
return visibleCells[x,y] != 0;
}