Core/Movement: Corrected all speed checks
Port From (https://github.com/TrinityCore/TrinityCore/commit/396457e36a78ebd6f2b1c801121880168908134b)
This commit is contained in:
@@ -351,6 +351,9 @@ namespace Game.Movement
|
|||||||
if (_owner.IsTypeId(TypeId.Player))
|
if (_owner.IsTypeId(TypeId.Player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (speedXY < 0.01f)
|
||||||
|
return;
|
||||||
|
|
||||||
float x, y, z;
|
float x, y, z;
|
||||||
float moveTimeHalf = (float)(speedZ / gravity);
|
float moveTimeHalf = (float)(speedZ / gravity);
|
||||||
float dist = 2 * moveTimeHalf * speedXY;
|
float dist = 2 * moveTimeHalf * speedXY;
|
||||||
@@ -393,6 +396,8 @@ namespace Game.Movement
|
|||||||
JumpArrivalCastArgs arrivalCast = null, SpellEffectExtraData spellEffectExtraData = null)
|
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);
|
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 moveTimeHalf = (float)(speedZ / gravity);
|
||||||
float max_height = -MoveSpline.computeFallElevation(moveTimeHalf, false, -speedZ);
|
float max_height = -MoveSpline.computeFallElevation(moveTimeHalf, false, -speedZ);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace Game.Movement
|
|||||||
|
|
||||||
if (!CHECK(path.Length > 1))
|
if (!CHECK(path.Length > 1))
|
||||||
return false;
|
return false;
|
||||||
if (!CHECK(velocity > 0.01f))
|
if (!CHECK(velocity >= 0.01f))
|
||||||
return false;
|
return false;
|
||||||
if (!CHECK(time_perc >= 0.0f && time_perc <= 1.0f))
|
if (!CHECK(time_perc >= 0.0f && time_perc <= 1.0f))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -4179,7 +4179,7 @@ namespace Game.Spells
|
|||||||
float ratio = 0.1f;
|
float ratio = 0.1f;
|
||||||
float speedxy = effectInfo.MiscValue * ratio;
|
float speedxy = effectInfo.MiscValue * ratio;
|
||||||
float speedz = damage * ratio;
|
float speedz = damage * ratio;
|
||||||
if (speedxy < 0.1f && speedz < 0.1f)
|
if (speedxy < 0.01f && speedz < 0.01f)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float x, y;
|
float x, y;
|
||||||
|
|||||||
Reference in New Issue
Block a user