equal
deleted
inserted
replaced
2226 // Clear the tunnel and continue at the other side of it. |
2226 // Clear the tunnel and continue at the other side of it. |
2227 if (CmdFailed(DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR))) |
2227 if (CmdFailed(DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR))) |
2228 return false; |
2228 return false; |
2229 _players_ai[p->index].cur_tile_a = TILE_MASK(_build_tunnel_endtile - TileOffsByDiagDir(_players_ai[p->index].cur_dir_a)); |
2229 _players_ai[p->index].cur_tile_a = TILE_MASK(_build_tunnel_endtile - TileOffsByDiagDir(_players_ai[p->index].cur_dir_a)); |
2230 return true; |
2230 return true; |
2231 } else { |
2231 } else { // IsBridge(tile) |
2232 // Check if the bridge points in the right direction. |
2232 // Check if the bridge points in the right direction. |
2233 // This is not really needed the first place AiRemoveTileAndGoForward is called. |
2233 // This is not really needed the first place AiRemoveTileAndGoForward is called. |
2234 if (DiagDirToAxis(GetTunnelBridgeDirection(tile)) != (_players_ai[p->index].cur_dir_a & 1)) return false; |
2234 if (DiagDirToAxis(GetTunnelBridgeDirection(tile)) != (_players_ai[p->index].cur_dir_a & 1)) return false; |
2235 |
2235 |
2236 tile = GetOtherBridgeEnd(tile); |
2236 tile = GetOtherBridgeEnd(tile); |