mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[12675] Fix MoveGen's interrupting after last commit
Signed-off-by: Schmoozerd <schmoozerd@cmangos> (based on commit [12473] - baa6525)
This commit is contained in:
parent
394be2c5bf
commit
60a7bec73f
14 changed files with 32 additions and 18 deletions
|
|
@ -10868,6 +10868,21 @@ void Unit::StopMoving(bool forceSendStop /*=false*/)
|
|||
init.Launch();
|
||||
}
|
||||
|
||||
void Unit::InterruptMoving(bool forceSendStop /*=false*/)
|
||||
{
|
||||
bool isMoving = false;
|
||||
|
||||
if (!movespline->Finalized())
|
||||
{
|
||||
Movement::Location loc = movespline->ComputePosition();
|
||||
movespline->_Interrupt();
|
||||
Relocate(loc.x, loc.y, loc.z, loc.orientation);
|
||||
isMoving = true;
|
||||
}
|
||||
|
||||
StopMoving(forceSendStop || isMoving);
|
||||
}
|
||||
|
||||
void Unit::SetFeared(bool apply, ObjectGuid casterGuid, uint32 spellID, uint32 time)
|
||||
{
|
||||
if (apply)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue