mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
refactor(Core/Movement): Drop no-progress guard now that probe + zone + validation fixes prevent the oscillation it was masking
This commit is contained in:
parent
0682817b42
commit
14c7de977a
@ -131,24 +131,6 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest)
|
||||
if (path.empty())
|
||||
return false;
|
||||
|
||||
// Progress guard: refuse to dispatch a path whose endpoint isn't
|
||||
// meaningfully closer to dest than the bot already is. Prevents
|
||||
// oscillation around terrain the mmap probe can route along but the
|
||||
// bot can't actually traverse (cave entries with missing nav, narrow
|
||||
// ledges, geometry that loops back). Reference doesn't have this
|
||||
// guard but their RPG layer detects stuck via different signals;
|
||||
// ours surfaces the issue here so the strategy can re-pick a POI.
|
||||
{
|
||||
float const distFromBot = botPos.distance(dest);
|
||||
float const distFromPathEnd = path.getBack().distance(dest);
|
||||
if (distFromPathEnd + 5.0f >= distFromBot)
|
||||
{
|
||||
EmitDebugMove("MoveFar", "no-progress",
|
||||
dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Walk dispatch.
|
||||
std::vector<WorldPosition> const& pts = path.getPointPath();
|
||||
Movement::PointsArray points;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user