From 5b4e2a849e422ea2470f191cca2b7244ef0db870 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Tue, 5 Sep 2023 01:08:35 +0800 Subject: [PATCH] fix knockback --- src/PlayerbotAI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index e33b1865..8e738d58 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -807,7 +807,7 @@ void PlayerbotAI::HandleBotOutgoingPacket(WorldPacket const& packet) p >> guid.ReadAsPacked() >> counter >> vcos >> vsin >> horizontalSpeed >> verticalSpeed; if (horizontalSpeed <= 0.1f) { - break; + horizontalSpeed = 0.11f; } verticalSpeed = -verticalSpeed; @@ -819,7 +819,7 @@ void PlayerbotAI::HandleBotOutgoingPacket(WorldPacket const& packet) bot->GetMotionMaster()->Clear(); - float moveTimeHalf = horizontalSpeed / Movement::gravity; + float moveTimeHalf = verticalSpeed / Movement::gravity; float dist = 2 * moveTimeHalf * horizontalSpeed; Position dest = bot->GetPosition();