fix(Core/Travel): Exclude NAV_GROUND_STEEP at all bot PathGenerator sites

This commit is contained in:
bash 2026-05-10 18:23:54 +02:00
parent e8da8e0e43
commit c9c63faff8
4 changed files with 5 additions and 0 deletions

View File

@ -4292,6 +4292,7 @@ bool ArenaTactics::Execute(Event /*event*/)
if (losBlocked)
{
PathGenerator path(bot);
path.AddExcludeFlag(NAV_GROUND_STEEP);
path.CalculatePath(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), false);
if (path.GetPathType() != PATHFIND_NOPATH)

View File

@ -124,6 +124,7 @@ bool GoAction::Execute(Event event)
if (botAI->HasStrategy("debug move", BOT_STATE_NON_COMBAT))
{
PathGenerator path(bot);
path.AddExcludeFlag(NAV_GROUND_STEEP);
path.CalculatePath(x, y, z, false);

View File

@ -977,6 +977,7 @@ bool MovementAction::ReachCombatTo(Unit* target, float distance)
return false;
PathGenerator path(bot);
path.AddExcludeFlag(NAV_GROUND_STEEP);
path.CalculatePath(tx, ty, tz, false);
PathType type = path.GetPathType();
int typeOk = PATHFIND_NORMAL | PATHFIND_INCOMPLETE | PATHFIND_SHORTCUT;
@ -1884,6 +1885,7 @@ PathResult MovementAction::GeneratePath(float x, float y, float z, uint32 accept
{
PathResult result;
PathGenerator gen(bot);
gen.AddExcludeFlag(NAV_GROUND_STEEP);
gen.CalculatePath(x, y, z, forceDestination);
result.pathType = gen.GetPathType();
result.reachable = !(result.pathType & (~acceptMask));

View File

@ -1256,6 +1256,7 @@ TravelNodeRoute TravelNodeMap::FindRouteNearestNodes(WorldPosition startPos, Wor
if (startNodePosition.GetMapId() == bot->GetMapId())
{
PathGenerator path(bot);
path.AddExcludeFlag(NAV_GROUND_STEEP);
path.CalculatePath(startNodePosition.GetPositionX(), startNodePosition.GetPositionY(), startNodePosition.GetPositionZ());
PathType type = path.GetPathType();
bool reachable = !(type & ~(PATHFIND_NORMAL | PATHFIND_INCOMPLETE | PATHFIND_FARFROMPOLY));