Fixing a stupid error

This commit is contained in:
Andreas Schmitt
2021-06-15 21:49:39 +02:00
committed by Jonathan G Rennison
parent 35a98fae7d
commit ac8da77d0b

View File

@@ -720,7 +720,7 @@ static void PublicRoad_GetNeighbours(AyStar *aystar, OpenListNode *current)
{ {
// Check if we could bridge a river from a flat tile. Not looking pretty on the map but you gotta do what you gotta do. // Check if we could bridge a river from a flat tile. Not looking pretty on the map but you gotta do what you gotta do.
const auto bridge_end = BuildRiverBridge(&current->path, forward_direction); const auto bridge_end = BuildRiverBridge(&current->path, forward_direction);
assert(IsValidTile(bridge_end) || GetTileSlope(bridge_end) == SLOPE_FLAT); assert(!IsValidTile(bridge_end) || GetTileSlope(bridge_end) == SLOPE_FLAT);
if (IsValidTile(bridge_end) && if (IsValidTile(bridge_end) &&
!IsBlockedByPreviousBridgeOrTunnel(current, current_tile, bridge_end)) { !IsBlockedByPreviousBridgeOrTunnel(current, current_tile, bridge_end)) {