This commit is contained in:
Paul Chote
2010-08-15 15:34:27 +12:00
parent 58fb7178ad
commit 10ea035b42
2 changed files with 5 additions and 0 deletions

View File

@@ -64,6 +64,10 @@ namespace OpenRA.Traits
for (int x = map.XOffset; x < map.XOffset + map.Width; x++)
for (int y = map.YOffset; y < map.YOffset + map.Height; y++)
{
// Todo: Valid terrain should be specified in the resource
if (!w.IsCellBuildable(new int2(x,y), false))
continue;
content[x, y].type = resourceTypes.FirstOrDefault(
r => r.info.ResourceType == w.Map.MapResources[x, y].type);
if (content[x, y].type != null)