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:
committed by
Oliver Brakmann
parent
2e06d5790b
commit
bc7bf174d8
@@ -149,11 +149,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
UpdatePowerState();
|
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);
|
||||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.SpeechNotification, self.Owner.Faction.InternalName);
|
|
||||||
|
|
||||||
nextPowerAdviceTime = info.AdviceInterval;
|
nextPowerAdviceTime = info.AdviceInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user