Remove redundant check from SupportPowerInstance.

This commit is contained in:
Paul Chote
2020-08-14 17:10:34 +01:00
committed by reaperrr
parent 7ee4fbeb0d
commit ad75e2be89

View File

@@ -203,8 +203,6 @@ namespace OpenRA.Mods.Common.Traits
if (!Active) if (!Active)
return; return;
if (Active)
{
var power = Instances.First(); var power = Instances.First();
if (Manager.DevMode.FastCharge && remainingSubTicks > 2500) if (Manager.DevMode.FastCharge && remainingSubTicks > 2500)
remainingSubTicks = 2500; remainingSubTicks = 2500;
@@ -218,14 +216,12 @@ namespace OpenRA.Mods.Common.Traits
notifiedCharging = true; notifiedCharging = true;
} }
if (RemainingTicks == 0 if (RemainingTicks == 0 && !notifiedReady)
&& !notifiedReady)
{ {
power.Charged(power.Self, Key); power.Charged(power.Self, Key);
notifiedReady = true; notifiedReady = true;
} }
} }
}
public virtual void Target() public virtual void Target()
{ {