src/ai/trolly/trolly.cpp
changeset 8614 4c67a883c4c4
parent 8563 13b1a41e46f1
child 8784 c2e9d649a9ce
equal deleted inserted replaced
8613:931d28d5c075 8614:4c67a883c4c4
  1249 
  1249 
  1250 	// When a vehicle is older then 1 year, it should make money...
  1250 	// When a vehicle is older then 1 year, it should make money...
  1251 	if (v->age > 360) {
  1251 	if (v->age > 360) {
  1252 		// If both years together are not more than AI_MINIMUM_ROUTE_PROFIT,
  1252 		// If both years together are not more than AI_MINIMUM_ROUTE_PROFIT,
  1253 		//  it is not worth the line I guess...
  1253 		//  it is not worth the line I guess...
  1254 		if ((v->profit_last_year + v->profit_this_year) >> 8 < AI_MINIMUM_ROUTE_PROFIT ||
  1254 		if (v->profit_last_year + v->profit_this_year < (Money)256 * AI_MINIMUM_ROUTE_PROFIT ||
  1255 				(v->reliability * 100 >> 16) < 40) {
  1255 				(v->reliability * 100 >> 16) < 40) {
  1256 			// There is a possibility that the route is fucked up...
  1256 			// There is a possibility that the route is fucked up...
  1257 			if (v->cargo.DaysInTransit() > AI_VEHICLE_LOST_DAYS) {
  1257 			if (v->cargo.DaysInTransit() > AI_VEHICLE_LOST_DAYS) {
  1258 				// The vehicle is lost.. check the route, or else, get the vehicle
  1258 				// The vehicle is lost.. check the route, or else, get the vehicle
  1259 				//  back to a depot
  1259 				//  back to a depot