mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
feat(Core/Debug): Emit MoveFar:spline-active, reuse-trim-failed, MoveRandomNear:all-fail
This commit is contained in:
parent
cfd5012b13
commit
e892d10eaa
@ -73,7 +73,11 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest)
|
|||||||
{
|
{
|
||||||
float remaining = bot->GetExactDist(lastMove.lastMoveToX, lastMove.lastMoveToY, lastMove.lastMoveToZ);
|
float remaining = bot->GetExactDist(lastMove.lastMoveToX, lastMove.lastMoveToY, lastMove.lastMoveToZ);
|
||||||
if (remaining > 10.0f)
|
if (remaining > 10.0f)
|
||||||
|
{
|
||||||
|
EmitDebugMove("MoveFar", "spline-active",
|
||||||
|
lastMove.lastMoveToX, lastMove.lastMoveToY, lastMove.lastMoveToZ);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,6 +105,11 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest)
|
|||||||
// makeShortCut may clear the path if the bot drifted
|
// makeShortCut may clear the path if the bot drifted
|
||||||
// too far off (>reactDistance from any waypoint). In
|
// too far off (>reactDistance from any waypoint). In
|
||||||
// that case fall through to fresh planning.
|
// that case fall through to fresh planning.
|
||||||
|
if (lastMove.lastPath.empty())
|
||||||
|
{
|
||||||
|
EmitDebugMove("MoveFar", "reuse-trim-failed",
|
||||||
|
dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ());
|
||||||
|
}
|
||||||
if (!lastMove.lastPath.empty())
|
if (!lastMove.lastPath.empty())
|
||||||
{
|
{
|
||||||
std::vector<WorldPosition> const& pts = lastMove.lastPath.getPointPath();
|
std::vector<WorldPosition> const& pts = lastMove.lastPath.getPointPath();
|
||||||
@ -386,6 +395,7 @@ bool NewRpgBaseAction::MoveRandomNear(float moveStep, MovementPriority priority,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EmitDebugMove("MoveRandomNear", "all-fail", x, y, z);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user