Remove order.TargetActor from Infiltrates, EngineerRepair, ExternalCaptures.

These cases already checked order.Target.Type so these are simple swaps.
This commit is contained in:
Paul Chote
2018-05-23 19:41:03 +00:00
committed by reaperrr
parent 6e400c5d60
commit 4a7bb39fbe
3 changed files with 4 additions and 4 deletions

View File

@@ -80,8 +80,8 @@ namespace OpenRA.Mods.Common.Traits
if (order.Target.Type == TargetType.Actor)
{
var c = order.TargetActor.TraitOrDefault<ExternalCapturable>();
return c != null && !c.CaptureInProgress && c.CanBeTargetedBy(self, order.TargetActor.Owner);
var c = order.Target.Actor.TraitOrDefault<ExternalCapturable>();
return c != null && !c.CaptureInProgress && c.CanBeTargetedBy(self, order.Target.Actor.Owner);
}
return false;