Skip to content

Commit

Permalink
Autotarget sets target line
Browse files Browse the repository at this point in the history
  • Loading branch information
pchote committed Dec 1, 2010
1 parent 4f6027e commit 4913d82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions OpenRA.Mods.RA/AutoTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

using OpenRA.Traits;
using OpenRA.Traits.Activities;
using System.Drawing;

namespace OpenRA.Mods.RA
{
Expand Down Expand Up @@ -42,10 +43,13 @@ public void TickIdle( Actor self )
var attack = self.Trait<AttackBase>();
var target = attack.ScanForTarget(self, null);
if( target != null )
{
self.SetTargetLine(Target.FromActor(target), Color.Red, false);
self.QueueActivity(attack.GetAttackActivity( self,
Target.FromActor(target),
self.Info.Traits.Get<AutoTargetInfo>().AllowMovement
));
}
}
}
}

0 comments on commit 4913d82

Please sign in to comment.