Fix #41
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace OpenRA.Mods.RA
|
||||
.SkipWhile(p => resLayer.GetResource(p) == resourceType && resLayer.IsFull(p.X, p.Y))
|
||||
.Cast<int2?>().FirstOrDefault();
|
||||
|
||||
// Todo: Valid terrain should be specified in the resource
|
||||
if (cell != null &&
|
||||
(resLayer.GetResource(cell.Value) == resourceType || resLayer.GetResource(cell.Value) == null) &&
|
||||
self.World.IsCellBuildable(cell.Value, false))
|
||||
|
||||
Reference in New Issue
Block a user