mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Movement: PropagateSpeedChange should only be called on the top (current active) movement generator
This commit is contained in:
@@ -180,11 +180,14 @@ MovementGenerator* MotionMaster::GetMotionSlot(int slot) const
|
||||
|
||||
void MotionMaster::PropagateSpeedChange()
|
||||
{
|
||||
for (int i = 0; i <= _top; ++i)
|
||||
{
|
||||
if (_slot[i])
|
||||
_slot[i]->UnitSpeedChanged();
|
||||
}
|
||||
if (empty())
|
||||
return;
|
||||
|
||||
MovementGenerator* movement = top();
|
||||
if (!movement)
|
||||
return;
|
||||
|
||||
movement->UnitSpeedChanged();
|
||||
}
|
||||
|
||||
bool MotionMaster::GetDestination(float &x, float &y, float &z)
|
||||
|
||||
Reference in New Issue
Block a user