diff --git a/OpenRa.Game/Traits/Cargo.cs b/OpenRa.Game/Traits/Cargo.cs index 943fdcf8dd..3d1f27cea0 100644 --- a/OpenRa.Game/Traits/Cargo.cs +++ b/OpenRa.Game/Traits/Cargo.cs @@ -15,12 +15,14 @@ namespace OpenRa.Game.Traits public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor) { - var unit = underCursor.traits.GetOrDefault(); - if (unit.Altitude > 0) return null; - // todo: check if there is an unoccupied `land` tile adjacent if (mi.Button == MouseButton.Right && underCursor == self && cargo.Count > 0) + { + var unit = underCursor.traits.GetOrDefault(); + if (unit != null && unit.Altitude > 0) return null; + return new Order("Deploy", self, null, int2.Zero, null); + } return null; }