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

@@ -31,7 +31,13 @@ namespace OpenRA.Mods.RA.Activities
var cargo = transport.traits.Get<Cargo>();
if (cargo.IsFull(transport))
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);
self.World.AddFrameEndTask(w => w.Remove(self));