mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
fix(Core/Travel): Exclude NAV_GROUND_STEEP on regen PathGenerator
This commit is contained in:
parent
974faf0cb0
commit
d72d3ded6c
@ -719,6 +719,12 @@ std::vector<WorldPosition> WorldPosition::getPathStepFrom(WorldPosition startPos
|
||||
}
|
||||
|
||||
PathGenerator path(pathUnit);
|
||||
// Apply bot-style filter even when source is a temp Creature so
|
||||
// generation-time paths match what bots can actually walk at
|
||||
// runtime. Without this, the temp-Creature branch of CreateFilter
|
||||
// leaves NAV_GROUND_STEEP included → generator produces walk
|
||||
// segments through 50-60° slopes that runtime bots can't traverse.
|
||||
path.SetExcludeFlags(path.GetExcludeFlags() | NAV_GROUND_STEEP);
|
||||
auto result = getPathStepFrom(startPos, path);
|
||||
|
||||
if (tempCreature)
|
||||
@ -851,6 +857,10 @@ std::vector<WorldPosition> WorldPosition::getPathFromPath(std::vector<WorldPosit
|
||||
}
|
||||
|
||||
PathGenerator path(pathUnit);
|
||||
// Same reason as in getPathStepFrom: ensure NAV_GROUND_STEEP is
|
||||
// excluded for the temp-Creature path so generation matches
|
||||
// runtime bot filter.
|
||||
path.SetExcludeFlags(path.GetExcludeFlags() | NAV_GROUND_STEEP);
|
||||
|
||||
// Limit the pathfinding attempts
|
||||
for (uint32 i = 0; i < maxAttempt; i++)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user