fix (Core/Movement) Allow MoveFollow to not inherit walkstate of the target to fix Enchanted Elemental speed (#19498)

* MoveFollow with own walkstate

* switch
This commit is contained in:
Tereneckla 2024-07-29 11:30:42 +00:00 committed by GitHub
parent 4c087c1c5f
commit e44e8fe109
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 23 deletions

View file

@ -520,7 +520,9 @@ bool FollowMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
Movement::MoveSplineInit init(owner);
init.MovebyPath(i_path->GetPath());
init.SetWalk(target->IsWalking() || target->movespline->isWalking());
if (_inheritWalkState)
init.SetWalk(target->IsWalking() || target->movespline->isWalking());
if (Optional<float> velocity = GetVelocity(owner, target, i_path->GetActualEndPosition(), owner->IsGuardian()))
init.SetVelocity(*velocity);
init.Launch();