Commit name: Add flying check to MoveSmoothPath

By Malcrom
This commit is contained in:
Aokromes
2017-04-12 23:21:58 +02:00
parent ab59c475d1
commit 43aecc42aa
5 changed files with 12 additions and 11 deletions

View File

@@ -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