src/openttd.cpp
changeset 8029 6cc607fe1d3d
parent 8013 82001acdb8d0
child 8057 9a378e86100b
equal deleted inserted replaced
8028:e578ea22f371 8029:6cc607fe1d3d
  2201 				SetTileOwner(t, OWNER_NONE);
  2201 				SetTileOwner(t, OWNER_NONE);
  2202 			}
  2202 			}
  2203 		}
  2203 		}
  2204 	}
  2204 	}
  2205 
  2205 
       
  2206 	/*
       
  2207 	 * Add the 'previous' owner to the ship depots so we can reset it with
       
  2208 	 * the correct values when it gets destroyed. This prevents that
       
  2209 	 * someone can remove canals owned by somebody else and it prevents
       
  2210 	 * making floods using the removal of ship depots.
       
  2211 	 */
       
  2212 	if (CheckSavegameVersion(83)) {
       
  2213 		for (TileIndex t = 0; t < map_size; t++) {
       
  2214 			if (IsTileType(t, MP_WATER) && IsShipDepot(t)) {
       
  2215 				_m[t].m4 = (TileHeight(t) == 0) ? OWNER_WATER : OWNER_NONE;
       
  2216 			}
       
  2217 		}
       
  2218 	}
       
  2219 
  2206 	if (CheckSavegameVersion(74)) {
  2220 	if (CheckSavegameVersion(74)) {
  2207 		Station *st;
  2221 		Station *st;
  2208 		FOR_ALL_STATIONS(st) {
  2222 		FOR_ALL_STATIONS(st) {
  2209 			for (CargoID c = 0; c < NUM_CARGO; c++) {
  2223 			for (CargoID c = 0; c < NUM_CARGO; c++) {
  2210 				st->goods[c].last_speed = 0;
  2224 				st->goods[c].last_speed = 0;