From 971287e9897fe1671b3f8c14d03f36cbe1f2e5f4 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Wed, 1 Dec 2010 18:22:46 +1300 Subject: [PATCH] Fix shroud crash --- OpenRA.Game/Traits/World/Shroud.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Game/Traits/World/Shroud.cs b/OpenRA.Game/Traits/World/Shroud.cs index 344674ef36..36e93802f3 100644 --- a/OpenRA.Game/Traits/World/Shroud.cs +++ b/OpenRA.Game/Traits/World/Shroud.cs @@ -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; }