mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Movement tweaks
This commit is contained in:
@@ -981,7 +981,7 @@ bool MovementAction::ChaseTo(WorldObject* obj, float distance, float angle)
|
||||
|
||||
UpdateMovementState();
|
||||
|
||||
if (bot->IsSitState())
|
||||
if (!bot->IsStandState())
|
||||
bot->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
|
||||
if (bot->IsNonMeleeSpellCast(true))
|
||||
@@ -1288,11 +1288,13 @@ bool SetBehindTargetAction::Execute(Event event)
|
||||
|
||||
float angle = GetFollowAngle() / 3 + target->GetOrientation() + M_PI;
|
||||
|
||||
//return ChaseTo(target, 0.f, angle);
|
||||
|
||||
float distance = sPlayerbotAIConfig->contactDistance;
|
||||
float x = target->GetPositionX() + cos(angle) * distance;
|
||||
float y = target->GetPositionY() + sin(angle) * distance;
|
||||
float z = target->GetPositionZ();
|
||||
//bot->UpdateGroundPositionZ(x, y, z);
|
||||
bot->UpdateGroundPositionZ(x, y, z);
|
||||
|
||||
return MoveTo(bot->GetMapId(), x, y, z);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user