From 71b13c7b5de1ff9682124f92d5345d8a0c67231e Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 2 Jan 2021 22:14:33 +0000 Subject: [PATCH] Disable AttackPopupTurreted state changes when paused. --- OpenRA.Mods.Cnc/Traits/Attack/AttackPopupTurreted.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Mods.Cnc/Traits/Attack/AttackPopupTurreted.cs b/OpenRA.Mods.Cnc/Traits/Attack/AttackPopupTurreted.cs index 3e95c6cc8f9b..5b5a8473366c 100644 --- a/OpenRA.Mods.Cnc/Traits/Attack/AttackPopupTurreted.cs +++ b/OpenRA.Mods.Cnc/Traits/Attack/AttackPopupTurreted.cs @@ -82,6 +82,9 @@ protected override void Created(Actor self) protected override bool CanAttack(Actor self, in Target target) { + if (IsTraitPaused) + return false; + if (state == PopupState.Closed) { state = PopupState.Transitioning; @@ -103,6 +106,9 @@ protected override bool CanAttack(Actor self, in Target target) void INotifyIdle.TickIdle(Actor self) { + if (IsTraitPaused) + return; + if (state == PopupState.Open && idleTicks++ > info.CloseDelay) { var facingOffset = new WVec(0, -1024, 0).Rotate(WRot.FromYaw(info.DefaultFacing));