diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs index 8fb1312067..217a32eca7 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs @@ -203,27 +203,23 @@ namespace OpenRA.Mods.Common.Traits if (!Active) return; - if (Active) + var power = Instances.First(); + if (Manager.DevMode.FastCharge && remainingSubTicks > 2500) + remainingSubTicks = 2500; + + if (remainingSubTicks > 0) + remainingSubTicks = (remainingSubTicks - 100).Clamp(0, TotalTicks * 100); + + if (!notifiedCharging) { - var power = Instances.First(); - if (Manager.DevMode.FastCharge && remainingSubTicks > 2500) - remainingSubTicks = 2500; + power.Charging(power.Self, Key); + notifiedCharging = true; + } - if (remainingSubTicks > 0) - remainingSubTicks = (remainingSubTicks - 100).Clamp(0, TotalTicks * 100); - - if (!notifiedCharging) - { - power.Charging(power.Self, Key); - notifiedCharging = true; - } - - if (RemainingTicks == 0 - && !notifiedReady) - { - power.Charged(power.Self, Key); - notifiedReady = true; - } + if (RemainingTicks == 0 && !notifiedReady) + { + power.Charged(power.Self, Key); + notifiedReady = true; } }