mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 11:52:32 +01:00
Commit name: Add flying check to MoveSmoothPath
By Malcrom
This commit is contained in:
@@ -515,25 +515,26 @@ void MotionMaster::MoveCirclePath(float x, float y, float z, float radius, bool
|
||||
init.Launch();
|
||||
}
|
||||
|
||||
void MotionMaster::MoveSmoothPath(uint32 pointId, G3D::Vector3 const* pathPoints, size_t pathSize, bool walk)
|
||||
void MotionMaster::MoveSmoothPath(uint32 pointId, G3D::Vector3 const* pathPoints, size_t pathSize, bool walk, bool fly)
|
||||
{
|
||||
Movement::PointsArray path(pathPoints, pathPoints + pathSize);
|
||||
MoveSmoothPath(pointId, path, walk);
|
||||
MoveSmoothPath(pointId, path, walk, fly);
|
||||
}
|
||||
|
||||
void MotionMaster::MoveSmoothPath(uint32 pointId, Movement::PointsArray const& path, bool walk)
|
||||
|
||||
void MotionMaster::MoveSmoothPath(uint32 pointId, Movement::PointsArray const& path, bool walk, bool fly)
|
||||
{
|
||||
Movement::MoveSplineInit init(_owner);
|
||||
if (_owner->CanFly())
|
||||
if (fly)
|
||||
{
|
||||
init.SetFly();
|
||||
init.SetUncompressed();
|
||||
}
|
||||
|
||||
init.MovebyPath(path);
|
||||
init.SetSmooth();
|
||||
init.SetWalk(walk);
|
||||
init.Launch();
|
||||
|
||||
|
||||
// This code is not correct
|
||||
// EffectMovementGenerator does not affect UNIT_STATE_ROAMING | UNIT_STATE_ROAMING_MOVE
|
||||
// need to call PointMovementGenerator with various pointIds
|
||||
|
||||
Reference in New Issue
Block a user