From 9ac912fa0e60e02fe1b933b1817f4cd43790e149 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 4 Nov 2011 16:33:20 +1300 Subject: [PATCH] #1262 fixed -- initial unit stance via AutoTarget:InitialStance: --- OpenRA.Mods.RA/AutoTarget.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/AutoTarget.cs b/OpenRA.Mods.RA/AutoTarget.cs index 1cedf6c5d9..18679b74b9 100644 --- a/OpenRA.Mods.RA/AutoTarget.cs +++ b/OpenRA.Mods.RA/AutoTarget.cs @@ -18,6 +18,7 @@ namespace OpenRA.Mods.RA { public readonly bool AllowMovement = true; public readonly int ScanRadius = -1; + public readonly UnitStance InitialStance = UnitStance.AttackAnything; public object Create(ActorInitializer init) { return new AutoTarget(init.self, this); } } @@ -30,12 +31,13 @@ namespace OpenRA.Mods.RA readonly AttackBase attack; [Sync] int nextScanTime = 0; - [Sync] public UnitStance stance = UnitStance.AttackAnything; + [Sync] public UnitStance stance; public AutoTarget(Actor self, AutoTargetInfo info) { Info = info; attack = self.Trait(); + stance = Info.InitialStance; } public void ResolveOrder(Actor self, Order order)