|
76 | 76 | //------------------------------------------------------------------------------------------------- |
77 | 77 |
|
78 | 78 |
|
| 79 | +static inline Bool IS_IMPASSABLE(PathfindCell::CellType type) { |
| 80 | + // Return true if cell is impassable to ground units. jba. [8/18/2003] |
| 81 | + if (type==PathfindCell::CELL_IMPASSABLE) { |
| 82 | + return true; |
| 83 | + } |
| 84 | + if (type==PathfindCell::CELL_OBSTACLE) { |
| 85 | + return true; |
| 86 | + } |
| 87 | + if (type==PathfindCell::CELL_BRIDGE_IMPASSABLE) { |
| 88 | + return true; |
| 89 | + } |
| 90 | + return false; |
| 91 | +} |
| 92 | + |
79 | 93 |
|
80 | 94 | struct TCheckMovementInfo |
81 | 95 | { |
@@ -3088,6 +3102,9 @@ void PathfindLayer::doDebugIcons() { |
3088 | 3102 | } else if (cell->getType() == PathfindCell::CELL_IMPASSABLE) { |
3089 | 3103 | color.red = color.green = color.blue = 1; |
3090 | 3104 | empty = false; |
| 3105 | + } else if (cell->getType() == PathfindCell::CELL_BRIDGE_IMPASSABLE) { |
| 3106 | + color.blue = color.red = 1; |
| 3107 | + empty = false; |
3091 | 3108 | } else if (cell->getType() == PathfindCell::CELL_CLIFF) { |
3092 | 3109 | color.red = 1; |
3093 | 3110 | empty = false; |
@@ -4388,6 +4405,7 @@ Locomotor* Pathfinder::chooseBestLocomotorForPosition(PathfindLayerEnum layer, L |
4388 | 4405 | return LOCOMOTORSURFACE_RUBBLE | LOCOMOTORSURFACE_AIR; |
4389 | 4406 |
|
4390 | 4407 | case PathfindCell::CELL_OBSTACLE: |
| 4408 | + case PathfindCell::CELL_BRIDGE_IMPASSABLE: |
4391 | 4409 | case PathfindCell::CELL_IMPASSABLE: |
4392 | 4410 | return LOCOMOTORSURFACE_AIR; |
4393 | 4411 |
|
@@ -5311,6 +5329,10 @@ void Pathfinder::doDebugIcons() { |
5311 | 5329 | color.red = 1; |
5312 | 5330 | empty = false; |
5313 | 5331 | break; |
| 5332 | + case PathfindCell::CELL_BRIDGE_IMPASSABLE: |
| 5333 | + color.blue = color.red = 1; |
| 5334 | + empty = false; |
| 5335 | + break; |
5314 | 5336 | case PathfindCell::CELL_IMPASSABLE: |
5315 | 5337 | color.green = 1; |
5316 | 5338 | empty = false; |
|
0 commit comments