File diff r8572:dcba9a2313b3 → r8573:c66e03190d64
src/station_cmd.cpp
Show inline comments
 
@@ -590,25 +590,25 @@ static void UpdateStationAcceptance(Stat
 
	for (const RoadStop *rs = st->truck_stops; rs != NULL; rs = rs->next) {
 
		MergePoint(&rect, rs->xy);
 
	}
 

	
 
	/* And retrieve the acceptance. */
 
	AcceptedCargo accepts;
 
	if (rect.max_x >= rect.min_x) {
 
		GetAcceptanceAroundTiles(
 
			accepts,
 
			TileXY(rect.min_x, rect.min_y),
 
			rect.max_x - rect.min_x + 1,
 
			rect.max_y - rect.min_y + 1,
 
			_patches.modified_catchment ? FindCatchmentRadius(st) : 4
 
			_patches.modified_catchment ? FindCatchmentRadius(st) : CA_UNMODIFIED
 
		);
 
	} else {
 
		memset(accepts, 0, sizeof(accepts));
 
	}
 

	
 
	/* Adjust in case our station only accepts fewer kinds of goods */
 
	for (CargoID i = 0; i < NUM_CARGO; i++) {
 
		uint amt = min(accepts[i], 15);
 

	
 
		/* Make sure the station can accept the goods type. */
 
		bool is_passengers = IsCargoInClass(i, CC_PASSENGERS);
 
		if ((!is_passengers && !(st->facilities & (byte)~FACIL_BUS_STOP)) ||
 
@@ -2703,25 +2703,25 @@ StationSet FindStationsAroundIndustryTil
 
	int max_rad;
 
	if (_patches.modified_catchment) {
 
		w_prod = w;
 
		h_prod = h;
 
		w += 2 * MAX_CATCHMENT;
 
		h += 2 * MAX_CATCHMENT;
 
		max_rad = MAX_CATCHMENT;
 
	} else {
 
		w_prod = 0;
 
		h_prod = 0;
 
		w += 8;
 
		h += 8;
 
		max_rad = 4;
 
		max_rad = CA_UNMODIFIED;
 
	}
 

	
 
	BEGIN_TILE_LOOP(cur_tile, w, h, tile - TileDiffXY(max_rad, max_rad))
 
		cur_tile = TILE_MASK(cur_tile);
 
		if (!IsTileType(cur_tile, MP_STATION)) continue;
 

	
 
		Station *st = GetStationByTile(cur_tile);
 

	
 
		if (st->IsBuoy()) continue; // bouys don't accept cargo
 

	
 

	
 
		if (_patches.modified_catchment) {