diff --git a/OpenRA.Mods.Common/Traits/InstantlyRepairs.cs b/OpenRA.Mods.Common/Traits/InstantlyRepairs.cs index caad7c7045a0..097526dbb58d 100644 --- a/OpenRA.Mods.Common/Traits/InstantlyRepairs.cs +++ b/OpenRA.Mods.Common/Traits/InstantlyRepairs.cs @@ -93,11 +93,11 @@ bool IsValidOrder(Order order) bool IsValidActor(Actor target) { - var instantlyRepairable = target.Info.TraitInfoOrDefault(); - if (instantlyRepairable == null) + var instantlyRepairable = target.TraitOrDefault(); + if (instantlyRepairable == null || instantlyRepairable.IsTraitDisabled) return false; - if (!instantlyRepairable.Types.IsEmpty && !instantlyRepairable.Types.Overlaps(Info.Types)) + if (!instantlyRepairable.Info.Types.IsEmpty && !instantlyRepairable.Info.Types.Overlaps(Info.Types)) return false; return true;