Autotarget sets target line

This commit is contained in:
Paul Chote
2010-12-01 21:14:10 +13:00
parent 4f6027e772
commit 4913d82bce

View File

@@ -10,6 +10,7 @@
using OpenRA.Traits;
using OpenRA.Traits.Activities;
using System.Drawing;
namespace OpenRA.Mods.RA
{
@@ -42,6 +43,8 @@ namespace OpenRA.Mods.RA
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
@@ -49,3 +52,4 @@ namespace OpenRA.Mods.RA
}
}
}
}