Skip to content

Commit 83a51f8

Browse files
Maullerxezon
authored andcommitted
fix(pathfinder): Add missing logical block for zone type optimization in PathfindZoneManager::calculateZones() (TheSuperHackers#2360)
1 parent ea390c4 commit 83a51f8

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2746,12 +2746,14 @@ void PathfindZoneManager::calculateZones( PathfindCell **map, PathfindLayer laye
27462746
notTerrainOrCrusher = FALSE;
27472747
}
27482748

2749-
if (waterGround(r_thisCell,r_topCell))
2750-
applyZone(r_thisCell, r_topCell, m_groundWaterZones, m_maxZone);
2751-
else if (groundRubble(r_thisCell, r_topCell))
2752-
applyZone(r_thisCell, r_topCell, m_groundRubbleZones, m_maxZone);
2753-
else if (groundCliff(r_thisCell,r_topCell))
2754-
applyZone(r_thisCell, r_topCell, m_groundCliffZones, m_maxZone);
2749+
if (notTerrainOrCrusher) {
2750+
if (waterGround(r_thisCell, r_topCell))
2751+
applyZone(r_thisCell, r_topCell, m_groundWaterZones, m_maxZone);
2752+
else if (groundRubble(r_thisCell, r_topCell))
2753+
applyZone(r_thisCell, r_topCell, m_groundRubbleZones, m_maxZone);
2754+
else if (groundCliff(r_thisCell, r_topCell))
2755+
applyZone(r_thisCell, r_topCell, m_groundCliffZones, m_maxZone);
2756+
}
27552757

27562758
}
27572759

0 commit comments

Comments
 (0)