From a3325277d919a27e65c63f1a580458931e8004f5 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Tue, 12 Mar 2019 14:35:09 +0100 Subject: [PATCH] Prevent support powers from creating two camera actors --- OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs | 2 +- OpenRA.Mods.Common/Traits/SupportPowers/ParatroopersPower.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs index 64e3703c6f..f43e674b14 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs @@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Traits Action onEnterRange = a => { // Spawn a camera and remove the beacon when the first plane enters the target area - if (info.CameraActor != null && !aircraftInRange.Any(kv => kv.Value)) + if (info.CameraActor != null && camera == null && !aircraftInRange.Any(kv => kv.Value)) { self.World.AddFrameEndTask(w => { diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/ParatroopersPower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/ParatroopersPower.cs index dbdf3d012a..27fcedd1a3 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/ParatroopersPower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/ParatroopersPower.cs @@ -101,7 +101,7 @@ namespace OpenRA.Mods.Common.Traits Action onEnterRange = a => { // Spawn a camera and remove the beacon when the first plane enters the target area - if (info.CameraActor != null && !aircraftInRange.Any(kv => kv.Value)) + if (info.CameraActor != null && camera == null && !aircraftInRange.Any(kv => kv.Value)) { self.World.AddFrameEndTask(w => {