Core/Movement: fixed waypoint movement commits up to 2ce9a0a094a3d86a86a9323693c93ed6a2bbcaaf
This commit is contained in:
1 parent
075a79dac1
commit
78e0328356
14 files changed
+150
-75
No files matched your search
@@ -10945,15 +10945,16 @@ void Unit::StopMoving()
|
||||
init.Stop();
|
||||
}
|
||||
|
||||
void Unit::PauseMovement(uint32 timer/* = 0*/, uint8 slot/* = 0*/)
|
||||
void Unit::PauseMovement(uint32 timer/* = 0*/, uint8 slot/* = 0*/, bool forced/* = true*/)
|
||||
{
|
||||
if (slot >= MAX_MOTION_SLOT)
|
||||
return;
|
||||
|
||||
if (MovementGenerator* movementGenerator = GetMotionMaster()->GetMotionSlot(slot))
|
||||
if (MovementGenerator* movementGenerator = GetMotionMaster()->GetMotionSlot(MovementSlot(slot)))
|
||||
movementGenerator->Pause(timer);
|
||||
|
||||
StopMoving();
|
||||
if (forced)
|
||||
StopMoving();
|
||||
}
|
||||
|
||||
void Unit::ResumeMovement(uint32 timer/* = 0*/, uint8 slot/* = 0*/)
|
||||
@@ -10961,7 +10962,7 @@ void Unit::ResumeMovement(uint32 timer/* = 0*/, uint8 slot/* = 0*/)
|
||||
if (slot >= MAX_MOTION_SLOT)
|
||||
return;
|
||||
|
||||
if (MovementGenerator* movementGenerator = GetMotionMaster()->GetMotionSlot(slot))
|
||||
if (MovementGenerator* movementGenerator = GetMotionMaster()->GetMotionSlot(MovementSlot(slot)))
|
||||
movementGenerator->Resume(timer);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user