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

(cherry picked from commit 40903dcd65)
This commit is contained in:
ccrs
2017-08-08 19:49:12 +02:00
committed by Shauren
parent 4cf5cb9031
commit b521bf1d3a

View File

@@ -178,11 +178,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)