From b80962b36535e3cbd73d72d516b59a9cfcb5d9db Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 25 Oct 2010 11:28:52 +1300 Subject: [PATCH] fix ore/tib growth -- we can always grow in a cell that already contains our resource type. buildable/terraintype checks only come into it when growing into *new* cells --- OpenRA.Mods.RA/SeedsResource.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.RA/SeedsResource.cs b/OpenRA.Mods.RA/SeedsResource.cs index 040a802787..f34f955f8d 100644 --- a/OpenRA.Mods.RA/SeedsResource.cs +++ b/OpenRA.Mods.RA/SeedsResource.cs @@ -49,9 +49,9 @@ namespace OpenRA.Mods.RA .Cast().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;