diff options
author | Shauren <shauren.trinity@gmail.com> | 2017-11-23 18:12:44 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2018-03-08 23:13:51 +0100 |
commit | 2baa81065ba27f0a6d278a8dd8a79b7c831e0a2b (patch) | |
tree | e8d4960ec63da14aeee2afaed037a64bd5835859 /src/server/game/Movement/MotionMaster.cpp | |
parent | 2840e096fc42faa80b839f16edaedc977b12bfee (diff) |
Core/Movement: Fixed creature hover
Closes #15177
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
-rw-r--r-- | src/server/game/Movement/MotionMaster.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index 131c96cce22..c10870703fa 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -356,7 +356,7 @@ void MotionMaster::MoveCloserAndStop(uint32 id, Unit* target, float distance) { // we are already close enough. We just need to turn toward the target without changing position. Movement::MoveSplineInit init(_owner); - init.MoveTo(_owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZMinusOffset()); + init.MoveTo(_owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ()); init.SetFacing(target); init.Launch(); Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE); @@ -499,7 +499,7 @@ void MotionMaster::MoveCirclePath(float x, float y, float z, float radius, bool if (_owner->IsFlying()) point.z = z; else - point.z = _owner->GetMapHeight(point.x, point.y, z); + point.z = _owner->GetMapHeight(point.x, point.y, z) + _owner->GetHoverOffset(); init.Path().push_back(point); } @@ -600,7 +600,7 @@ void MotionMaster::MoveFall(uint32 id /*=0*/) } Movement::MoveSplineInit init(_owner); - init.MoveTo(_owner->GetPositionX(), _owner->GetPositionY(), tz, false); + init.MoveTo(_owner->GetPositionX(), _owner->GetPositionY(), tz + _owner->GetHoverOffset(), false); init.SetFall(); init.Launch(); Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED); |