mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-17 02:40:28 +00:00
Movement priority
This commit is contained in:
@@ -94,12 +94,14 @@ bool MoveToRpgTargetAction::Execute(Event event)
|
||||
|
||||
x += cos(angle) * INTERACTION_DISTANCE * distance;
|
||||
y += sin(angle) * INTERACTION_DISTANCE * distance;
|
||||
bool exact = true;
|
||||
if (!wo->GetMap()->CheckCollisionAndGetValidCoords(wo, wo->GetPositionX(), wo->GetPositionY(), wo->GetPositionZ(),
|
||||
x, y, z))
|
||||
{
|
||||
x = wo->GetPositionX();
|
||||
y = wo->GetPositionY();
|
||||
z = wo->GetPositionZ();
|
||||
exact = false;
|
||||
}
|
||||
// WaitForReach(distance);
|
||||
|
||||
@@ -108,7 +110,7 @@ bool MoveToRpgTargetAction::Execute(Event event)
|
||||
// if (bot->IsWithinLOS(x, y, z))
|
||||
// couldMove = MoveNear(mapId, x, y, z, 0);
|
||||
// else
|
||||
couldMove = MoveTo(mapId, x, y, z, false, false, false, true);
|
||||
couldMove = MoveTo(mapId, x, y, z, false, false, false, exact);
|
||||
|
||||
if (!couldMove && WorldPosition(mapId, x, y, z).distance(bot) > INTERACTION_DISTANCE)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user