mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[c12617] Change a default config setting to more fitting
This commit is contained in:
parent
dc3de04d62
commit
e0290b165a
8 changed files with 45 additions and 4 deletions
|
|
@ -141,3 +141,21 @@ void EffectMovementGenerator::Finalize(Unit& unit)
|
|||
unit.GetMotionMaster()->Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
void FlyOrLandMovementGenerator::Initialize(Unit& unit)
|
||||
{
|
||||
if (unit.hasUnitState(UNIT_STAT_CAN_NOT_REACT | UNIT_STAT_NOT_MOVE))
|
||||
return;
|
||||
|
||||
if (!unit.IsStopped())
|
||||
unit.StopMoving();
|
||||
|
||||
float x, y, z;
|
||||
GetDestination(x, y, z);
|
||||
unit.addUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE);
|
||||
Movement::MoveSplineInit init(unit);
|
||||
init.SetFly();
|
||||
init.SetAnimation((m_liftOff ? Movement::FlyToGround : Movement::ToGround));
|
||||
init.MoveTo(x, y, z, false);
|
||||
init.Launch();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue