diff --git a/OpenRA.Mods.Common/Scripting/Properties/GeneralProperties.cs b/OpenRA.Mods.Common/Scripting/Properties/GeneralProperties.cs index d7a0f6e46eb8..3e88924c0446 100644 --- a/OpenRA.Mods.Common/Scripting/Properties/GeneralProperties.cs +++ b/OpenRA.Mods.Common/Scripting/Properties/GeneralProperties.cs @@ -175,7 +175,6 @@ public string Stance if (!Enum.TryParse(value, true, out var stance)) throw new LuaException($"Unknown stance type '{value}'"); - autotarget.PredictedStance = stance; autotarget.SetStance(Self, stance); } } diff --git a/OpenRA.Mods.Common/Traits/AutoTarget.cs b/OpenRA.Mods.Common/Traits/AutoTarget.cs index fa5e4209774b..00c2f67798e5 100644 --- a/OpenRA.Mods.Common/Traits/AutoTarget.cs +++ b/OpenRA.Mods.Common/Traits/AutoTarget.cs @@ -153,7 +153,7 @@ public void SetStance(Actor self, UnitStance value) return; var oldStance = Stance; - Stance = value; + Stance = PredictedStance = value; ApplyStanceCondition(self); foreach (var nsc in notifyStanceChanged) @@ -204,8 +204,7 @@ protected override void Created(Actor self) void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner) { - PredictedStance = self.Owner.IsBot || !self.Owner.Playable ? Info.InitialStanceAI : Info.InitialStance; - SetStance(self, PredictedStance); + SetStance(self, self.Owner.IsBot || !self.Owner.Playable ? Info.InitialStanceAI : Info.InitialStance); } void IResolveOrder.ResolveOrder(Actor self, Order order)