move & knockback

This commit is contained in:
Yunfan Li
2023-09-02 10:43:13 +08:00
parent 62e49a966d
commit 5f5faf00cd
5 changed files with 103 additions and 75 deletions

View File

@@ -46,13 +46,13 @@ bool ServerFacade::IsDistanceLessOrEqualThan(float dist1, float dist2)
void ServerFacade::SetFacingTo(Player* bot, WorldObject* wo, bool force)
{
float angle = bot->GetAngle(wo);
if (!force && bot->isMoving())
bot->SetFacingTo(bot->GetAngle(wo));
else
{
// if (!force && bot->isMoving())
// bot->SetFacingTo(bot->GetAngle(wo));
// else
// {
bot->SetOrientation(angle);
bot->SendMovementFlagUpdate();
}
// }
}
Unit* ServerFacade::GetChaseTarget(Unit* target)