From a39a82b97ccdb13ab57f33a471e3a659b9019c4f Mon Sep 17 00:00:00 2001 From: celguar Date: Tue, 19 Dec 2023 07:45:37 +0300 Subject: [PATCH] Fix error in jumping --- playerbot/strategy/actions/MovementActions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playerbot/strategy/actions/MovementActions.cpp b/playerbot/strategy/actions/MovementActions.cpp index 8146c4edf..6f39a07d2 100644 --- a/playerbot/strategy/actions/MovementActions.cpp +++ b/playerbot/strategy/actions/MovementActions.cpp @@ -2628,7 +2628,7 @@ WorldPosition JumpAction::CalculateJumpParameters(const WorldPosition& src, Unit WorldPosition destination = WorldPosition(src.getMapId(), fx, fy ,fz); distanceToLand = sqrtf(src.sqDistance2d(destination)); - timeToLand = CalculateJumpTime(src.getZ() + 0.5f - fz, vSpeed, ascending); + timeToLand = CalculateJumpTime(fz - (src.getZ() + 0.5f), vSpeed, ascending); // some error in time calculations - cancel the jump if (timeToLand == 0.f)