mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Movement: crashfix
New movement -> Mutate -> Finish current for that slot that happens to be the same type, Follow -> Finish method on the removed movement -> UpdateSpeed call -> search for top -> crash Closes #21861
This commit is contained in:
@@ -161,9 +161,13 @@ void MotionMaster::MovementExpired(bool reset /*= true*/)
|
||||
MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType() const
|
||||
{
|
||||
if (empty())
|
||||
return IDLE_MOTION_TYPE;
|
||||
return MAX_MOTION_TYPE;
|
||||
|
||||
return top()->GetMovementGeneratorType();
|
||||
MovementGenerator* movement = top();
|
||||
if (!movement)
|
||||
return MAX_MOTION_TYPE;
|
||||
|
||||
return movement->GetMovementGeneratorType();
|
||||
}
|
||||
|
||||
MovementGeneratorType MotionMaster::GetMotionSlotType(MovementSlot slot) const
|
||||
|
||||
Reference in New Issue
Block a user