Assembly resolving, fixes to crate dropping.

This commit is contained in:
Matthew Bowra-Dean
2010-03-19 17:50:27 +13:00
parent c2e9f41051
commit d471c602c7
4 changed files with 45 additions and 4 deletions

View File

@@ -65,9 +65,16 @@ namespace OpenRA.Mods.RA.Effects
world.AddFrameEndTask(w =>
{
w.Remove(this);
w.Add(cargo);
int2 loc = ((1 / 24f) * location).ToInt2();
cargo.CancelActivity();
cargo.traits.Get<Mobile>().TeleportTo(cargo, ((1 / 24f) * location).ToInt2());
if (cargo.traits.Contains<Mobile>())
cargo.traits.Get<Mobile>().TeleportTo(cargo, loc);
else
{
cargo.Location = loc;
cargo.CenterLocation = Util.CenterOfCell(loc);
}
w.Add(cargo);
});
}