diff options
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
-rw-r--r-- | src/server/game/Movement/MotionMaster.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index 2ad8028ca4f..d7bf433677c 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -340,7 +340,7 @@ void MotionMaster::MoveKnockbackFrom(float srcX, float srcY, float speedXY, floa _owner->GetNearPoint(_owner, x, y, z, _owner->GetObjectSize(), dist, _owner->GetAngle(srcX, srcY) + M_PI); Movement::MoveSplineInit init(_owner); - init.MoveTo(x,y,z); + init.MoveTo(x, y, z); init.SetParabolic(max_height,0); init.SetOrientationFixed(true); init.SetVelocity(speedXY); @@ -423,6 +423,18 @@ void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id, } } +void MotionMaster::MoveCharge(PathGenerator path, float speed, uint32 id) +{ + Vector3 dest = path.getActualEndPosition(); + + MoveCharge(dest.x, dest.y, dest.z); + + Movement::MoveSplineInit init(_owner); + init.MovebyPath(path.getPath()); + init.SetVelocity(speed); + init.Launch(); +} + void MotionMaster::MoveSeekAssistance(float x, float y, float z) { if (_owner->GetTypeId() == TYPEID_PLAYER) |