Don't teleport into transport's.

This commit is contained in:
Paul Chote
2010-08-08 19:30:49 +12:00
parent 6fc945ac91
commit d9acf1a3e5

View File

@@ -32,6 +32,12 @@ namespace OpenRA.Mods.RA.Activities
if (cargo.IsFull(transport)) if (cargo.IsFull(transport))
return NextActivity; return NextActivity;
// Todo: Queue a move order to the transport? need to be
// careful about units that can't path to the transport
if ((transport.Location - self.Location).Length > 1)
return NextActivity;
cargo.Load(transport, self); cargo.Load(transport, self);
self.World.AddFrameEndTask(w => w.Remove(self)); self.World.AddFrameEndTask(w => w.Remove(self));