Core/Entities: Some changes to LoS z checking & MotionMaster.MoveJumpTo

Port From (https://github.com/TrinityCore/TrinityCore/commit/fe362cf2c9d5c71db4698480ce26cb35dbc58f28)
This commit is contained in:
hondacrx
2021-03-17 13:55:29 -04:00
parent 369c4526be
commit f2317c2bdf
6 changed files with 45 additions and 43 deletions
+3 -3
View File
@@ -379,11 +379,11 @@ namespace Game.Movement
if (_owner.IsTypeId(TypeId.Player))
return;
float x, y, z;
float moveTimeHalf = (float)(speedZ / gravity);
float dist = 2 * moveTimeHalf * speedXY;
_owner.GetClosePoint(out x, out y, out z, _owner.GetCombatReach(), dist, angle);
_owner.GetNearPoint2D(out float x, out float y, dist, _owner.GetOrientation() + angle);
float z = _owner.GetPositionZ() + _owner.GetMidsectionHeight();
_owner.UpdateAllowedPositionZ(x, y, ref z);
MoveJump(x, y, z, 0.0f, speedXY, speedZ);
}