Allow a carryable to change his destination after being reserved
This commit is contained in:
@@ -54,17 +54,18 @@ namespace OpenRA.Mods.D2k.Traits
|
|||||||
|
|
||||||
void RequestTransport(CPos destination, Activity afterLandActivity)
|
void RequestTransport(CPos destination, Activity afterLandActivity)
|
||||||
{
|
{
|
||||||
if (locked || Reserved)
|
if (destination == CPos.Zero || (self.Location - destination).Length < info.MinDistance)
|
||||||
return;
|
{
|
||||||
|
WantsTransport = false; // Be sure to cancel any pending transports
|
||||||
if (destination == CPos.Zero)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ((self.Location - destination).Length < info.MinDistance)
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Destination = destination;
|
Destination = destination;
|
||||||
this.afterLandActivity = afterLandActivity;
|
this.afterLandActivity = afterLandActivity;
|
||||||
|
|
||||||
|
if (locked || Reserved)
|
||||||
|
return;
|
||||||
|
|
||||||
WantsTransport = true;
|
WantsTransport = true;
|
||||||
|
|
||||||
// Inform all idle carriers
|
// Inform all idle carriers
|
||||||
|
|||||||
Reference in New Issue
Block a user