From a1a2972618a17ff7e315c08fa100413c5b4ee5c2 Mon Sep 17 00:00:00 2001 From: bash Date: Fri, 8 May 2026 10:10:51 +0200 Subject: [PATCH] chore(Core/Movement): Tune dispatch cap to 70y --- src/Ai/Base/Actions/MovementActions.cpp | 4 ++-- src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Ai/Base/Actions/MovementActions.cpp b/src/Ai/Base/Actions/MovementActions.cpp index fdbaac69a..eb38a8fef 100644 --- a/src/Ai/Base/Actions/MovementActions.cpp +++ b/src/Ai/Base/Actions/MovementActions.cpp @@ -3232,14 +3232,14 @@ bool MovementAction::LaunchWalkSpline(TravelPlan& state) for (auto& pt : state.walkPoints) bot->UpdateAllowedPositionZ(pt.x, pt.y, pt.z); - // Cap dispatched path length at ~100y. The active spline runs + // Cap dispatched path length at ~70y. The active spline runs // until the bot is within ~10y of its endpoint, then MoveFarTo / // ExecuteTravelPlan replans from the new position. Capping per- // dispatch distance gives the planner regular re-evaluation // points (terrain shifts, combat, position drift) instead of // committing the whole batch upfront. { - constexpr float maxDispatchLength = 100.0f; + constexpr float maxDispatchLength = 70.0f; float accumulated = 0.f; size_t cutoff = state.walkPoints.size(); for (size_t i = 1; i < state.walkPoints.size(); ++i) diff --git a/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp b/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp index 48d80d990..c8a144e2b 100644 --- a/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp +++ b/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp @@ -236,7 +236,7 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest) if (points.size() >= 2) { - // Cap dispatched path length at ~100y. MoveFarTo's + // Cap dispatched path length at ~70y. MoveFarTo's // early-exit (top of function) lets the active spline // run until bot is within 10y of its endpoint, then // replans from the new position. Capping per-dispatch @@ -244,7 +244,7 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest) // points without the per-tick replan cost of fully // unbounded chunks. { - constexpr float maxDispatchLength = 100.0f; + constexpr float maxDispatchLength = 70.0f; float accumulated = 0.f; size_t cutoff = points.size(); for (size_t i = 1; i < points.size(); ++i)