Core/Movement: Corrected all speed checks

Port From (https://github.com/TrinityCore/TrinityCore/commit/396457e36a78ebd6f2b1c801121880168908134b)
This commit is contained in:
hondacrx
2019-08-31 11:54:00 -04:00
parent 929a5f1f4e
commit 8ee11c7c65
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -351,6 +351,9 @@ namespace Game.Movement
if (_owner.IsTypeId(TypeId.Player))
return;
if (speedXY < 0.01f)
return;
float x, y, z;
float moveTimeHalf = (float)(speedZ / gravity);
float dist = 2 * moveTimeHalf * speedXY;
@@ -393,6 +396,8 @@ namespace Game.Movement
JumpArrivalCastArgs arrivalCast = null, SpellEffectExtraData spellEffectExtraData = null)
{
Log.outDebug(LogFilter.Server, "Unit ({0}) jump to point (X: {1} Y: {2} Z: {3})", _owner.GetGUID().ToString(), x, y, z);
if (speedXY < 0.01f)
return;
float moveTimeHalf = (float)(speedZ / gravity);
float max_height = -MoveSpline.computeFallElevation(moveTimeHalf, false, -speedZ);