Skip to content

Commit

Permalink
fix ore/tib growth -- we can always grow in a cell that already conta…
Browse files Browse the repository at this point in the history
…ins our resource type. buildable/terraintype checks only come into it when growing into *new* cells
  • Loading branch information
chrisforbes committed Oct 24, 2010
1 parent 814c6a8 commit b80962b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions OpenRA.Mods.RA/SeedsResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public void Tick(Actor self)
.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))
if (cell != null && self.World.Map.IsInMap(cell.Value) &&
(resLayer.GetResource(cell.Value) == resourceType
|| (resLayer.GetResource(cell.Value) == null && self.World.IsCellBuildable(cell.Value, false))))
resLayer.AddResource(resourceType, cell.Value.X, cell.Value.Y, 1);

ticks = info.Interval;
Expand Down

0 comments on commit b80962b

Please sign in to comment.