Fix units being picked up when they no longer want it
This commit is contained in:
@@ -115,6 +115,9 @@ namespace OpenRA.Mods.Common.Activities
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var ndcm in notifyDockClientMoving)
|
||||
ndcm.MovementCancelled(self);
|
||||
|
||||
// The dock explicitly chosen by the user is currently occupied. Wait and check again.
|
||||
QueueChild(new Wait(dockClient.Info.SearchForDockDelay));
|
||||
return false;
|
||||
|
||||
@@ -158,6 +158,9 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (!actualResupplyStarted && activeResupplyTypes > 0)
|
||||
{
|
||||
actualResupplyStarted = true;
|
||||
foreach (var t in transportCallers)
|
||||
t.MovementCancelled(self);
|
||||
|
||||
foreach (var notifyResupply in notifyResupplies)
|
||||
notifyResupply.BeforeResupply(host.Actor, self, activeResupplyTypes);
|
||||
|
||||
|
||||
@@ -52,6 +52,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
t.MovementCancelled(self);
|
||||
}
|
||||
|
||||
void INotifyHarvestAction.Harvested(Actor self, string resourceType) { }
|
||||
void INotifyHarvestAction.Harvested(Actor self, string resourceType)
|
||||
{
|
||||
foreach (var t in transports)
|
||||
t.MovementCancelled(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user