File diff r25450:7e9533370994 → r25451:917146b539af
src/station_base.h
Show inline comments
 
@@ -572,25 +572,25 @@ void ForAllStationsAroundTiles(const Til
 
	std::set<StationID> seen_stations;
 

	
 
	/* Scan an area around the building covering the maximum possible station
 
	 * to find the possible nearby stations. */
 
	uint max_c = _settings_game.station.modified_catchment ? MAX_CATCHMENT : CA_UNMODIFIED;
 
	TileArea ta_ext = TileArea(ta).Expand(max_c);
 
	TILE_AREA_LOOP(tile, ta_ext) {
 
	for (TileIndex tile : ta_ext) {
 
		if (IsTileType(tile, MP_STATION)) seen_stations.insert(GetStationIndex(tile));
 
	}
 

	
 
	for (StationID stationid : seen_stations) {
 
		Station *st = Station::GetIfValid(stationid);
 
		if (st == nullptr) continue; /* Waypoint */
 

	
 
		/* Check if station is attached to an industry */
 
		if (!_settings_game.station.serve_neutral_industries && st->industry != nullptr) continue;
 

	
 
		/* Test if the tile is within the station's catchment */
 
		TILE_AREA_LOOP(tile, ta) {
 
		for (TileIndex tile : ta) {
 
			if (st->TileIsInCatchment(tile)) {
 
				if (func(st, tile)) break;
 
			}
 
		}
 
	}
 
}