add IHasLocation
This commit is contained in:
@@ -58,18 +58,7 @@ namespace OpenRA.Mods.RA.Effects
|
||||
w.Remove(this);
|
||||
var loc = Traits.Util.CellContaining(location);
|
||||
cargo.CancelActivity();
|
||||
|
||||
var mobile = cargo.TraitOrDefault<ITeleportable>();
|
||||
|
||||
if (mobile != null)
|
||||
mobile.SetPosition(cargo, loc);
|
||||
else
|
||||
{
|
||||
cargo.CenterLocation = Traits.Util.CenterOfCell(loc);
|
||||
|
||||
if (cargo.HasTrait<IOccupySpace>())
|
||||
world.WorldActor.Trait<UnitInfluence>().Add(cargo, cargo.Trait<IOccupySpace>());
|
||||
}
|
||||
cargo.Trait<ITeleportable>().SetPosition(cargo, loc);
|
||||
w.Add(cargo);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user