Distinguish between all map cells and cells inside map bounds.

This commit is contained in:
Paul Chote
2015-05-30 14:33:01 +01:00
parent 6650e3d9c7
commit bf4722fb9f
8 changed files with 38 additions and 26 deletions

View File

@@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits
var resources = w.WorldActor.TraitsImplementing<ResourceType>()
.ToDictionary(r => r.Info.ResourceType, r => r);
foreach (var cell in w.Map.Cells)
foreach (var cell in w.Map.AllCells)
{
ResourceType t;
if (!resources.TryGetValue(w.Map.MapResources.Value[cell].Type, out t))
@@ -83,7 +83,7 @@ namespace OpenRA.Mods.Common.Traits
}
// Set initial density based on the number of neighboring resources
foreach (var cell in w.Map.Cells)
foreach (var cell in w.Map.AllCells)
{
var type = content[cell].Type;
if (type != null)