mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 00:19:59 +01:00
Core/Entities: Some changes to LoS z checking & MotionMaster::MoveJumpTo (PR #20970)
- Use Midsection height for LoS checking.
- Changed MotionMaster::MoveJumpTo to use correct z. This change also makes sure the _owner will jump towards the given angle. Instead of jumping to a unintended angle if the first one is not in LoS.
(cherry picked from commit 95456ab5d8)
This commit is contained in:
@@ -456,7 +456,9 @@ 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->GetCombatReach(), dist, angle);
|
||||
_owner->GetNearPoint2D(x, y, dist, _owner->GetOrientation() + angle);
|
||||
z = _owner->GetPositionZ() + _owner->GetMidsectionHeight();
|
||||
_owner->UpdateAllowedPositionZ(x, y, z);
|
||||
MoveJump(x, y, z, 0.0f, speedXY, speedZ);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user