[Knockback] Fix knockback direction

This commit is contained in:
Yunfan Li
2024-09-24 21:23:10 +08:00
parent 2756664b77
commit 1386367e9b

View File

@@ -1102,7 +1102,7 @@ void PlayerbotAI::HandleBotOutgoingPacket(WorldPacket const& packet)
bot->GetMotionMaster()->Clear();
Unit* currentTarget = GetAiObjectContext()->GetValue<Unit*>("current target")->Get();
bot->GetMotionMaster()->MoveKnockbackFromForPlayer(bot->GetPositionX() + vcos, bot->GetPositionY() + vsin,
bot->GetMotionMaster()->MoveKnockbackFromForPlayer(bot->GetPositionX() - vcos, bot->GetPositionY() - vsin,
horizontalSpeed, verticalSpeed);
// bot->AddUnitMovementFlag(MOVEMENTFLAG_FALLING);