mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +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
|
|
@ -32,8 +32,7 @@ void PointMovementGenerator<T>::Initialize(T& unit)
|
|||
if (unit.hasUnitState(UNIT_STAT_CAN_NOT_REACT | UNIT_STAT_NOT_MOVE))
|
||||
return;
|
||||
|
||||
if (!unit.IsStopped())
|
||||
unit.StopMoving();
|
||||
unit.StopMoving();
|
||||
|
||||
unit.addUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE);
|
||||
Movement::MoveSplineInit init(unit);
|
||||
|
|
@ -53,15 +52,14 @@ void PointMovementGenerator<T>::Finalize(T& unit)
|
|||
template<class T>
|
||||
void PointMovementGenerator<T>::Interrupt(T& unit)
|
||||
{
|
||||
unit.InterruptMoving();
|
||||
unit.clearUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void PointMovementGenerator<T>::Reset(T& unit)
|
||||
{
|
||||
if (!unit.IsStopped())
|
||||
unit.StopMoving();
|
||||
|
||||
unit.StopMoving();
|
||||
unit.addUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE);
|
||||
}
|
||||
|
||||
|
|
@ -152,8 +150,7 @@ void FlyOrLandMovementGenerator::Initialize(Unit& unit)
|
|||
if (unit.hasUnitState(UNIT_STAT_CAN_NOT_REACT | UNIT_STAT_NOT_MOVE))
|
||||
return;
|
||||
|
||||
if (!unit.IsStopped())
|
||||
unit.StopMoving();
|
||||
unit.StopMoving();
|
||||
|
||||
float x, y, z;
|
||||
GetDestination(x, y, z);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue