Make Wanders and AttackWander queue activities instead of resolving orders

This commit is contained in:
abcdefg30
2023-02-06 19:54:52 +01:00
committed by Matthias Mailänder
parent 4500d964b3
commit 040fbf9694
2 changed files with 9 additions and 14 deletions

View File

@@ -9,6 +9,7 @@
*/
#endregion
using OpenRA.Mods.Common.Activities;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
@@ -32,7 +33,7 @@ namespace OpenRA.Mods.Common.Traits
public override void DoAction(Actor self, CPos targetCell)
{
attackMove.ResolveOrder(self, new Order("AttackMove", self, Target.FromCell(self.World, targetCell), false));
self.QueueActivity(new AttackMoveActivity(self, () => Move.MoveTo(targetCell, targetLineColor: attackMove.Info.TargetLineColor), false));
}
}
}