Fix #1269 - Transport Helicopter Loading while in the Air

Note that weight is now checked for cargo (this might break things)
This commit is contained in:
alzeih
2011-12-11 22:19:59 +13:00
committed by Chris Forbes
parent 7e590b05c1
commit b508f7c300
2 changed files with 11 additions and 2 deletions

View File

@@ -87,6 +87,16 @@ namespace OpenRA.Mods.RA
return true;
}
public bool CanLoad(Actor self, Actor a)
{
if (!HasSpace(GetWeight(a)))
return false;
// Cannot load mid-air
var move = self.TraitOrDefault<IMove>();
return move == null || move.Altitude == 0;
}
public string CursorForOrder(Actor self, Order order)
{
if (order.OrderString != "Unload") return null;