Don't get stuck in deployed mode because of an impossible move order

This commit is contained in:
Pavel Penev
2015-08-21 16:46:47 +03:00
parent 7668e0a30c
commit cdedfe6931
2 changed files with 4 additions and 1 deletions

View File

@@ -142,6 +142,9 @@ namespace OpenRA.Mods.Common.Activities
public override Activity Tick(Actor self) public override Activity Tick(Actor self)
{ {
if (IsCanceled)
return NextActivity;
if (moveDisablers.Any(d => d.MoveDisabled(self))) if (moveDisablers.Any(d => d.MoveDisabled(self)))
return this; return this;

View File

@@ -95,7 +95,7 @@ namespace OpenRA.Mods.Common.Traits
if (isUpgraded) if (isUpgraded)
{ {
// Play undeploy animation and after that revoke the upgrades // Play undeploy animation and after that revoke the upgrades
self.QueueActivity(new CallFunc(() => self.QueueActivity(false, new CallFunc(() =>
{ {
if (!string.IsNullOrEmpty(info.UndeploySound)) if (!string.IsNullOrEmpty(info.UndeploySound))
Sound.Play(info.UndeploySound, self.CenterPosition); Sound.Play(info.UndeploySound, self.CenterPosition);