Skip to content

Commit

Permalink
Fix error in jumping
Browse files Browse the repository at this point in the history
  • Loading branch information
celguar committed Dec 19, 2023
1 parent a11241e commit a39a82b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playerbot/strategy/actions/MovementActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a39a82b

Please sign in to comment.