src/station_cmd.cpp
changeset 7498 16bf3e859669
parent 7494 ab05bad37410
child 7501 e4897cce1fac
equal deleted inserted replaced
7497:40e457c0a8ac 7498:16bf3e859669
  2595 	int h_prod;
  2595 	int h_prod;
  2596 	int max_rad;
  2596 	int max_rad;
  2597 	if (_patches.modified_catchment) {
  2597 	if (_patches.modified_catchment) {
  2598 		w_prod = w;
  2598 		w_prod = w;
  2599 		h_prod = h;
  2599 		h_prod = h;
  2600 		w += 16;
  2600 		w += 2 * MAX_CATCHMENT;
  2601 		h += 16;
  2601 		h += 2 * MAX_CATCHMENT;
  2602 		max_rad = 8;
  2602 		max_rad = MAX_CATCHMENT;
  2603 	} else {
  2603 	} else {
  2604 		w_prod = 0;
  2604 		w_prod = 0;
  2605 		h_prod = 0;
  2605 		h_prod = 0;
  2606 		w += 8;
  2606 		w += 8;
  2607 		h += 8;
  2607 		h += 8;
  2622 						(!_patches.selectgoods || st->goods[type].last_speed > 0) && // we are servicing the station (or cargo is dumped on all stations)
  2622 						(!_patches.selectgoods || st->goods[type].last_speed > 0) && // we are servicing the station (or cargo is dumped on all stations)
  2623 						((st->facilities & ~FACIL_BUS_STOP)   != 0 || IsCargoInClass(type, CC_PASSENGERS)) && // if we have other fac. than a bus stop, or the cargo is passengers
  2623 						((st->facilities & ~FACIL_BUS_STOP)   != 0 || IsCargoInClass(type, CC_PASSENGERS)) && // if we have other fac. than a bus stop, or the cargo is passengers
  2624 						((st->facilities & ~FACIL_TRUCK_STOP) != 0 || !IsCargoInClass(type, CC_PASSENGERS))) { // if we have other fac. than a cargo bay or the cargo is not passengers
  2624 						((st->facilities & ~FACIL_TRUCK_STOP) != 0 || !IsCargoInClass(type, CC_PASSENGERS))) { // if we have other fac. than a cargo bay or the cargo is not passengers
  2625 					if (_patches.modified_catchment) {
  2625 					if (_patches.modified_catchment) {
  2626 						// min and max coordinates of the producer relative
  2626 						// min and max coordinates of the producer relative
  2627 						const int x_min_prod = 9;
  2627 						const int x_min_prod = max_rad + 1;
  2628 						const int x_max_prod = 8 + w_prod;
  2628 						const int x_max_prod = max_rad + w_prod;
  2629 						const int y_min_prod = 9;
  2629 						const int y_min_prod = max_rad + 1;
  2630 						const int y_max_prod = 8 + h_prod;
  2630 						const int y_max_prod = max_rad + h_prod;
  2631 
  2631 
  2632 						int rad = FindCatchmentRadius(st);
  2632 						int rad = FindCatchmentRadius(st);
  2633 
  2633 
  2634 						int x_dist = min(w_cur - x_min_prod, x_max_prod - w_cur);
  2634 						int x_dist = min(w_cur - x_min_prod, x_max_prod - w_cur);
  2635 						if (w_cur < x_min_prod) {
  2635 						if (w_cur < x_min_prod) {