aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Movement/MotionMaster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
-rw-r--r--src/server/game/Movement/MotionMaster.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 2b323e196a7..b69322f5720 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -423,6 +423,24 @@ 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)
+{
+ Movement::PointsArray path(pathPoints, pathPoints + pathSize);
+
+ Movement::MoveSplineInit init(_owner);
+ 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
+ Mutate(new EffectMovementGenerator(pointId), MOTION_SLOT_ACTIVE);
+ //Position pos(pathPoints[pathSize - 1].x, pathPoints[pathSize - 1].y, pathPoints[pathSize - 1].z);
+ //MovePoint(EVENT_CHARGE_PREPATH, pos, false);
+}
+
void MotionMaster::MoveFall(uint32 id /*=0*/)
{
// use larger distance for vmap height search than in most other cases