Merge remote-tracking branch 'Eliminationzx/FixJumpDestOrientation' into 3.3.5 (PR #16450) with some minor CS adjustments
This commit is contained in:
commit
cfed2d7a3d
14 files changed
+39
-38
No files matched your search
@@ -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, 0.0f, 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 /* = false*/)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user