Disable AttackPopupTurreted state changes when paused.

This commit is contained in:
Paul Chote
2021-01-02 22:14:33 +00:00
committed by abcdefg30
parent b3f39bffce
commit 71b13c7b5d

View File

@@ -82,6 +82,9 @@ namespace OpenRA.Mods.Cnc.Traits
protected override bool CanAttack(Actor self, in Target target)
{
if (IsTraitPaused)
return false;
if (state == PopupState.Closed)
{
state = PopupState.Transitioning;
@@ -103,6 +106,9 @@ namespace OpenRA.Mods.Cnc.Traits
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));