Skip to content

Commit

Permalink
Disable AttackPopupTurreted state changes when paused.
Browse files Browse the repository at this point in the history
  • Loading branch information
pchote authored and abcdefg30 committed Jan 3, 2021
1 parent b3f39bf commit 71b13c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OpenRA.Mods.Cnc/Traits/Attack/AttackPopupTurreted.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
Expand Down

0 comments on commit 71b13c7

Please sign in to comment.