--- a/src/ai/default/default.cpp Fri Feb 15 21:05:46 2008 +0000
+++ b/src/ai/default/default.cpp Fri Feb 15 23:57:03 2008 +0000
@@ -1604,7 +1604,7 @@
static bool AiCheckTrackResources(TileIndex tile, const AiDefaultBlockData *p, byte cargo)
{
- uint rad = (_patches.modified_catchment) ? CA_TRAIN : 4;
+ uint rad = (_patches.modified_catchment) ? CA_TRAIN : CA_UNMODIFIED;
for (; p->mode != 4; p++) {
AcceptedCargo values;
@@ -3409,7 +3409,7 @@
const AirportFTAClass* airport = GetAirport(p->attr);
uint w = airport->size_x;
uint h = airport->size_y;
- uint rad = _patches.modified_catchment ? airport->catchment : 4;
+ uint rad = _patches.modified_catchment ? airport->catchment : CA_UNMODIFIED;
if (cargo & 0x80) {
GetProductionAroundTiles(values, tile2, w, h, rad);
--- a/src/airport_gui.cpp Fri Feb 15 21:05:46 2008 +0000
+++ b/src/airport_gui.cpp Fri Feb 15 23:57:03 2008 +0000
@@ -179,7 +179,7 @@
airport = GetAirport(_selected_airport_type);
SetTileSelectSize(airport->size_x, airport->size_y);
- int rad = _patches.modified_catchment ? airport->catchment : 4;
+ int rad = _patches.modified_catchment ? airport->catchment : CA_UNMODIFIED;
if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
--- a/src/dock_gui.cpp Fri Feb 15 21:05:46 2008 +0000
+++ b/src/dock_gui.cpp Fri Feb 15 23:57:03 2008 +0000
@@ -243,7 +243,7 @@
case WE_CREATE: w->LowerWidget(_station_show_coverage + 3); break;
case WE_PAINT: {
- int rad = (_patches.modified_catchment) ? CA_DOCK : 4;
+ int rad = (_patches.modified_catchment) ? CA_DOCK : CA_UNMODIFIED;
if (WP(w, def_d).close) return;
DrawWindowWidgets(w);
--- a/src/rail_gui.cpp Fri Feb 15 21:05:46 2008 +0000
+++ b/src/rail_gui.cpp Fri Feb 15 23:57:03 2008 +0000
@@ -818,7 +818,7 @@
SetTileSelectSize(x, y);
}
- int rad = (_patches.modified_catchment) ? CA_TRAIN : 4;
+ int rad = (_patches.modified_catchment) ? CA_TRAIN : CA_UNMODIFIED;
if (_station_show_coverage)
SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
--- a/src/road_gui.cpp Fri Feb 15 21:05:46 2008 +0000
+++ b/src/road_gui.cpp Fri Feb 15 23:57:03 2008 +0000
@@ -809,7 +809,7 @@
DrawWindowWidgets(w);
if (_station_show_coverage) {
- int rad = _patches.modified_catchment ? CA_TRUCK /* = CA_BUS */ : 4;
+ int rad = _patches.modified_catchment ? CA_TRUCK /* = CA_BUS */ : CA_UNMODIFIED;
SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
} else {
SetTileSelectSize(1, 1);
--- a/src/station.h Fri Feb 15 21:05:46 2008 +0000
+++ b/src/station.h Fri Feb 15 23:57:03 2008 +0000
@@ -239,6 +239,8 @@
CA_TRAIN = 4,
CA_DOCK = 5,
+ CA_UNMODIFIED = 4, ///< Used when _patches.modified_catchment is false
+
MAX_CATCHMENT = 10, ///< Airports have a catchment up to this number.
};
--- a/src/station_cmd.cpp Fri Feb 15 21:05:46 2008 +0000
+++ b/src/station_cmd.cpp Fri Feb 15 23:57:03 2008 +0000
@@ -599,7 +599,7 @@
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));
@@ -2712,7 +2712,7 @@
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))