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
8b55163351
commit
cd49241a4f
@ -3232,14 +3232,14 @@ bool MovementAction::LaunchWalkSpline(TravelPlan& state)
|
|||||||
for (auto& pt : state.walkPoints)
|
for (auto& pt : state.walkPoints)
|
||||||
bot->UpdateAllowedPositionZ(pt.x, pt.y, pt.z);
|
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 /
|
// until the bot is within ~10y of its endpoint, then MoveFarTo /
|
||||||
// ExecuteTravelPlan replans from the new position. Capping per-
|
// ExecuteTravelPlan replans from the new position. Capping per-
|
||||||
// dispatch distance gives the planner regular re-evaluation
|
// dispatch distance gives the planner regular re-evaluation
|
||||||
// points (terrain shifts, combat, position drift) instead of
|
// points (terrain shifts, combat, position drift) instead of
|
||||||
// committing the whole batch upfront.
|
// committing the whole batch upfront.
|
||||||
{
|
{
|
||||||
constexpr float maxDispatchLength = 100.0f;
|
constexpr float maxDispatchLength = 70.0f;
|
||||||
float accumulated = 0.f;
|
float accumulated = 0.f;
|
||||||
size_t cutoff = state.walkPoints.size();
|
size_t cutoff = state.walkPoints.size();
|
||||||
for (size_t i = 1; i < state.walkPoints.size(); ++i)
|
for (size_t i = 1; i < state.walkPoints.size(); ++i)
|
||||||
|
|||||||
@ -237,7 +237,7 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest)
|
|||||||
|
|
||||||
if (points.size() >= 2)
|
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
|
// early-exit (top of function) lets the active spline
|
||||||
// run until bot is within 10y of its endpoint, then
|
// run until bot is within 10y of its endpoint, then
|
||||||
// replans from the new position. Capping per-dispatch
|
// replans from the new position. Capping per-dispatch
|
||||||
@ -245,7 +245,7 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest)
|
|||||||
// points without the per-tick replan cost of fully
|
// points without the per-tick replan cost of fully
|
||||||
// unbounded chunks.
|
// unbounded chunks.
|
||||||
{
|
{
|
||||||
constexpr float maxDispatchLength = 100.0f;
|
constexpr float maxDispatchLength = 70.0f;
|
||||||
float accumulated = 0.f;
|
float accumulated = 0.f;
|
||||||
size_t cutoff = points.size();
|
size_t cutoff = points.size();
|
||||||
for (size_t i = 1; i < points.size(); ++i)
|
for (size_t i = 1; i < points.size(); ++i)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user