aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Movement/MotionMaster.cpp
diff options
context:
space:
mode:
authorAokromes <aokromes@gmail.com>2017-04-16 15:10:48 +0200
committerAokromes <aokromes@gmail.com>2017-04-16 15:10:48 +0200
commitd8fdc893ee207851270107c1f16dc548800d7d4a (patch)
tree2334956193aba18a27ee45570d6c85db53727561 /src/server/game/Movement/MotionMaster.cpp
parentc0eb6c313053d2437abf2e7fff9ab50645c98559 (diff)
Commit name: Add flying check to MoveSmoothPath
By Malcrom
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
-rw-r--r--src/server/game/Movement/MotionMaster.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 271207558c1..8008e32ba73 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -457,17 +457,21 @@ 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);