From 4f0b18a3dc707d4b60ae4fda88ffbbcfa28c46c2 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 19 Sep 2014 15:50:11 +0200 Subject: [PATCH] Remove beacons when the badgers get shot down --- OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs | 9 +++++++++ OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs index 6c88987efd..22b13d3035 100644 --- a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs +++ b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs @@ -106,6 +106,15 @@ namespace OpenRA.Mods.RA } camera = null; + + if (beacon != null) + { + self.World.AddFrameEndTask(w => + { + w.Remove(beacon); + beacon = null; + }); + } } }; diff --git a/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs b/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs index a0358cd46d..25c8281b7a 100644 --- a/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/ParatroopersPower.cs @@ -115,6 +115,15 @@ namespace OpenRA.Mods.RA } camera = null; + + if (beacon != null) + { + self.World.AddFrameEndTask(w => + { + w.Remove(beacon); + beacon = null; + }); + } } };