Avoid unnecessary Mobile lookups in Follow.

This commit is contained in:
Paul Chote
2013-08-18 16:10:12 +12:00
parent 9bbeb63989
commit 8fd4243861
3 changed files with 5 additions and 4 deletions

View File

@@ -98,7 +98,7 @@ namespace OpenRA.Mods.RA
attack.Target = target;
if (allowMove && self.HasTrait<Mobile>() && !self.Info.Traits.Get<MobileInfo>().OnRails)
return Util.SequenceActivities(new Follow(target, range), this);
return Util.SequenceActivities(new Follow(self, target, range), this);
}
return NextActivity;