Don't tick the announcement timer when not in low power

When entering low power it will be reset to 0 again anyway
This commit is contained in:
abcdefg30
2020-06-19 18:23:51 +02:00
committed by Oliver Brakmann
parent 2e06d5790b
commit bc7bf174d8

View File

@@ -149,11 +149,9 @@ namespace OpenRA.Mods.Common.Traits
UpdatePowerState();
}
if (--nextPowerAdviceTime <= 0)
if (isLowPower && --nextPowerAdviceTime <= 0)
{
if (isLowPower)
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.SpeechNotification, self.Owner.Faction.InternalName);
nextPowerAdviceTime = info.AdviceInterval;
}