Fix aircraft being repaired mid-air

Repairable was originally written for ground actors,
so it's both safer and much easier to just handle this in Aircraft directly.
This commit is contained in:
reaperrr
2018-11-19 10:36:52 +01:00
committed by Paul Chote
parent 560d7b4ee8
commit b8d3c9f73a
2 changed files with 6 additions and 2 deletions

View File

@@ -101,6 +101,10 @@ namespace OpenRA.Mods.Common.Traits
if (order.Target.Type != TargetType.Actor)
return;
// Aircraft handle Repair orders directly in the Aircraft trait
if (self.Info.HasTraitInfo<AircraftInfo>())
return;
if (!CanRepairAt(order.Target.Actor) || (!CanRepair() && !CanRearm()))
return;