diff options
author | Elimination <lorder222@Rambler.ru> | 2016-02-02 00:27:26 +0700 |
---|---|---|
committer | Elimination <lorder222@Rambler.ru> | 2016-02-10 20:25:29 +0700 |
commit | ff80f249a7f576c6809c7e21b011de4975c35f71 (patch) | |
tree | b0eb2643f7c6c5922327ff9d6f17e44ed4c4c083 /src/server/game/Movement/MotionMaster.cpp | |
parent | 20a8476cd885417b1f2fd4ac27c440efafae7bb8 (diff) |
Fix jump dest orientation
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
-rw-r--r-- | src/server/game/Movement/MotionMaster.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index 3fcae1398f9..2f38814880b 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -366,10 +366,10 @@ void MotionMaster::MoveJumpTo(float angle, float speedXY, float speedZ) float moveTimeHalf = speedZ / Movement::gravity; float dist = 2 * moveTimeHalf * speedXY; _owner->GetClosePoint(x, y, z, _owner->GetObjectSize(), dist, angle); - MoveJump(x, y, z, speedXY, speedZ); + MoveJump(x, y, z, _owner->GetOrientation(), speedXY, speedZ); } -void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id) +void MotionMaster::MoveJump(float x, float y, float z, float o, float speedXY, float speedZ, uint32 id, bool hasOrientation) { TC_LOG_DEBUG("misc", "Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUID().GetCounter(), x, y, z); if (speedXY <= 0.1f) @@ -382,6 +382,8 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee init.MoveTo(x, y, z, false); init.SetParabolic(max_height, 0); init.SetVelocity(speedXY); + if (hasOrientation) + init.SetFacing(o); init.Launch(); Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED); } |