diff --git a/OpenRa.Game/Bullet.cs b/OpenRa.Game/Bullet.cs index ec4498f9f3..5c8947b259 100644 --- a/OpenRa.Game/Bullet.cs +++ b/OpenRa.Game/Bullet.cs @@ -92,6 +92,9 @@ namespace OpenRa.Game Smudge.AddSmudge(false, targetTile.X, targetTile.Y); break; } + + if (Warhead.Ore) + Ore.Destroy(targetTile.X, targetTile.Y); }); var maxSpread = GetMaximumSpread(); diff --git a/OpenRa.Game/Ore.cs b/OpenRa.Game/Ore.cs index 4ea1bb0a86..07a456536b 100644 --- a/OpenRa.Game/Ore.cs +++ b/OpenRa.Game/Ore.cs @@ -17,6 +17,15 @@ namespace OpenRa.Game } } + public static void Destroy(int i, int j) + { + if (Rules.Map.ContainsResource(new int2(i, j))) + { + Rules.Map.MapTiles[i, j].density = 0; + Rules.Map.MapTiles[i, j].overlay = 0xff; + } + } + public static bool CanSpreadInto(int i, int j) { if (Game.BuildingInfluence.GetBuildingAt(new int2(i, j)) != null)