Core/Movement: PropagateSpeedChange should only be called on the top (current active) movement generator

Port From (https://github.com/TrinityCore/TrinityCore/commit/b521bf1d3a4e59abf0d7c15200de5fff7430d2ed)
This commit is contained in:
hondacrx
2020-08-24 11:37:57 -04:00
parent c0d28a8f21
commit 203bbfd3b7
+8 -5
View File
@@ -157,11 +157,14 @@ namespace Game.Movement
public void PropagateSpeedChange()
{
for (int i = 0; i <= _top; ++i)
{
if (_slot[i] != null)
_slot[i].UnitSpeedChanged();
}
if (Empty())
return;
IMovementGenerator movement = Top();
if (movement == null)
return;
movement.UnitSpeedChanged();
}
public bool GetDestination(out float x, out float y, out float z)