src/openttd.cpp
changeset 8525 2670d1ad818c
parent 8521 8580cfbf1786
child 8526 2c0a12f36f25
equal deleted inserted replaced
8524:fd510eb2b515 8525:2670d1ad818c
  2362 		}
  2362 		}
  2363 	}
  2363 	}
  2364 
  2364 
  2365 	if (CheckSavegameVersion(87)) {
  2365 	if (CheckSavegameVersion(87)) {
  2366 		for (TileIndex t = 0; t < map_size; t++) {
  2366 		for (TileIndex t = 0; t < map_size; t++) {
       
  2367 			if (!IsTileType(t, MP_VOID) && (TileX(t) == 0 || TileY(t) == 0 || TileX(t) == MapMaxX() || TileY(t) == MapMaxY())) {
       
  2368 				/* Some version 86 savegames have wrong water class at map borders (under buoy, or after removing buoy).
       
  2369 				 * This conversion has to be done before buoys with invalid owner are removed. */
       
  2370 				SetWaterClass(t, WATER_CLASS_SEA);
       
  2371 			}
       
  2372 
  2367 			if (IsBuoyTile(t) || IsDriveThroughStopTile(t) || IsTileType(t, MP_WATER)) {
  2373 			if (IsBuoyTile(t) || IsDriveThroughStopTile(t) || IsTileType(t, MP_WATER)) {
  2368 				Owner o = GetTileOwner(t);
  2374 				Owner o = GetTileOwner(t);
  2369 				if (IsValidPlayer(o) && !GetPlayer(o)->is_active) {
  2375 				if (IsValidPlayer(o) && !GetPlayer(o)->is_active) {
  2370 					_current_player = o;
  2376 					_current_player = o;
  2371 					ChangeTileOwner(t, o, PLAYER_SPECTATOR);
  2377 					ChangeTileOwner(t, o, PLAYER_SPECTATOR);