mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
chore(Core/Movement): Tune dispatch cap to 70y
This commit is contained in:
parent
fc2e42cddc
commit
a1a2972618
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user