2321 } |
2322 } |
2322 } |
2323 } |
2323 } |
2324 } |
2324 |
2325 |
2325 if (CheckSavegameVersion(86)) { |
2326 if (CheckSavegameVersion(86)) { |
2326 /* Now all crossings should be in correct state */ |
|
2327 for (TileIndex t = 0; t < map_size; t++) { |
2327 for (TileIndex t = 0; t < map_size; t++) { |
|
2328 /* Now all crossings should be in correct state */ |
2328 if (IsLevelCrossingTile(t)) UpdateLevelCrossing(t, false); |
2329 if (IsLevelCrossingTile(t)) UpdateLevelCrossing(t, false); |
|
2330 |
|
2331 /* Move river flag and update canals to use water class */ |
|
2332 if (IsTileType(t, MP_WATER)) { |
|
2333 if (_m[t].m5 == 2) { |
|
2334 MakeRiver(t, Random()); |
|
2335 } else { |
|
2336 Owner o = GetTileOwner(t); |
|
2337 if (IsWater(t) && o != OWNER_WATER) { |
|
2338 MakeCanal(t, o, Random()); |
|
2339 } |
|
2340 } |
|
2341 } |
|
2342 } |
|
2343 |
|
2344 /* Update locks, depots, docks and buoys to have a water class based |
|
2345 * on its neighbouring tiles. Done after river and canal updates to |
|
2346 * ensure neighbours are correct. */ |
|
2347 for (TileIndex t = 0; t < map_size; t++) { |
|
2348 if (GetTileSlope(t, NULL) != SLOPE_FLAT) continue; |
|
2349 |
|
2350 if (IsTileType(t, MP_WATER) && (GetWaterTileType(t) == WATER_TILE_LOCK || IsShipDepot(t))) SetWaterClassDependingOnSurroundings(t); |
|
2351 if (IsTileType(t, MP_STATION) && (IsDock(t) || IsBuoy(t))) SetWaterClassDependingOnSurroundings(t); |
2329 } |
2352 } |
2330 } |
2353 } |
2331 |
2354 |
2332 return InitializeWindowsAndCaches(); |
2355 return InitializeWindowsAndCaches(); |
2333 } |
2356 } |