From 206c5afcca5b9c51ddd222cace627e63f92b3685 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 11 Jul 2022 22:21:27 -0400 Subject: [PATCH] Core/Formation: Fixes creature formation movement not syncing with leader. --- Source/Game/Movement/Generators/FormationMovement.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/Movement/Generators/FormationMovement.cs b/Source/Game/Movement/Generators/FormationMovement.cs index 9eb307a4a..a637e76eb 100644 --- a/Source/Game/Movement/Generators/FormationMovement.cs +++ b/Source/Game/Movement/Generators/FormationMovement.cs @@ -167,7 +167,7 @@ namespace Game.Movement To get a representative result like that we have to predict our formation leader's path and apply our formation shape based on that destination. */ - Position dest = target.GetPosition(); + Position dest = new Position(target.GetPosition()); float velocity = 0.0f; // Formation leader is moving. Predict our destination @@ -209,7 +209,7 @@ namespace Game.Movement init.SetVelocity(velocity); init.Launch(); - _lastLeaderPosition = target.GetPosition(); + _lastLeaderPosition = new Position(target.GetPosition()); owner.AddUnitState(UnitState.FollowFormationMove); RemoveFlag(MovementGeneratorFlags.Interrupted); }