From fa067fa9052c7078fbe6d457ee4c359591402f4a Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Tue, 10 Dec 2013 16:52:41 +1300 Subject: [PATCH] Remove custom terrain when clearing resources. Fixes #4272. --- OpenRA.Game/Traits/World/ResourceLayer.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Game/Traits/World/ResourceLayer.cs b/OpenRA.Game/Traits/World/ResourceLayer.cs index 8be0bc0446..1854ac7649 100644 --- a/OpenRA.Game/Traits/World/ResourceLayer.cs +++ b/OpenRA.Game/Traits/World/ResourceLayer.cs @@ -193,7 +193,10 @@ namespace OpenRA.Traits return null; if (--content[p.X, p.Y].Density < 0) + { content[p.X, p.Y] = EmptyCell; + world.Map.CustomTerrain[p.X, p.Y] = null; + } if (!dirty.Contains(p)) dirty.Add(p); @@ -209,6 +212,7 @@ namespace OpenRA.Traits // Clear cell content[p.X, p.Y] = EmptyCell; + world.Map.CustomTerrain[p.X, p.Y] = null; if (!dirty.Contains(p)) dirty.Add(p);