Fix location checks for queued deployment.

This commit is contained in:
tovl
2019-07-01 23:27:06 +02:00
committed by Paul Chote
parent b4b3ce68a9
commit 2912bff850
2 changed files with 2 additions and 13 deletions

View File

@@ -51,10 +51,7 @@ namespace OpenRA.Mods.Common.Activities
// Prevent deployment in bogus locations
var transforms = self.TraitOrDefault<Transforms>();
if (transforms != null && !transforms.CanDeploy())
{
Cancel(self, true);
return true;
}
foreach (var nt in self.TraitsImplementing<INotifyTransform>())
nt.BeforeTransform(self);
@@ -71,15 +68,10 @@ namespace OpenRA.Mods.Common.Activities
return false;
}
DoTransform(self);
return true;
}
protected override void OnLastRun(Actor self)
{
if (!IsCanceling)
DoTransform(self);
}
void DoTransform(Actor self)
{
// This activity may be buried as a child within one or more parents

View File

@@ -137,10 +137,7 @@ namespace OpenRA.Mods.Common.Traits
return;
}
if (!queued)
self.CancelActivity();
self.QueueActivity(GetTransformActivity(self));
self.QueueActivity(queued, GetTransformActivity(self));
}
public void ResolveOrder(Actor self, Order order)