src/station_cmd.cpp
changeset 6088 c11f7acc18bd
parent 6087 b56c54f79335
child 6095 55d5c0e6be3a
equal deleted inserted replaced
6087:b56c54f79335 6088:c11f7acc18bd
  1367 
  1367 
  1368 	/* ensure that in case of error (or no DC_EXEC) the new road stop gets deleted upon return */
  1368 	/* ensure that in case of error (or no DC_EXEC) the new road stop gets deleted upon return */
  1369 	std::auto_ptr<RoadStop> rs_auto_delete(road_stop);
  1369 	std::auto_ptr<RoadStop> rs_auto_delete(road_stop);
  1370 
  1370 
  1371 	if (st != NULL &&
  1371 	if (st != NULL &&
  1372 			GetNumRoadStopsInStation(st, RoadStop::BUS) + GetNumRoadStopsInStation(st, RoadStop::TRUCK) >= ROAD_STOP_LIMIT) {
  1372 			GetNumRoadStopsInStation(st, RoadStop::BUS) + GetNumRoadStopsInStation(st, RoadStop::TRUCK) >= RoadStop::LIMIT) {
  1373 		return_cmd_error(type ? STR_3008B_TOO_MANY_TRUCK_STOPS : STR_3008A_TOO_MANY_BUS_STOPS);
  1373 		return_cmd_error(type ? STR_3008B_TOO_MANY_TRUCK_STOPS : STR_3008A_TOO_MANY_BUS_STOPS);
  1374 	}
  1374 	}
  1375 
  1375 
  1376 	/* In case of new station if DC_EXEC is NOT set we still need to create the station
  1376 	/* In case of new station if DC_EXEC is NOT set we still need to create the station
  1377 	* to test if everything is OK. In this case we need to delete it before return. */
  1377 	* to test if everything is OK. In this case we need to delete it before return. */