src/economy.cpp
changeset 6773 bc98b0b16ec4
parent 6698 611e079b7cd1
child 6819 f986f54e2660
equal deleted inserted replaced
6772:8672ba1bebc9 6773:bc98b0b16ec4
   115 		bool min_profit_first = true;
   115 		bool min_profit_first = true;
   116 		uint num = 0;
   116 		uint num = 0;
   117 
   117 
   118 		FOR_ALL_VEHICLES(v) {
   118 		FOR_ALL_VEHICLES(v) {
   119 			if (v->owner != owner) continue;
   119 			if (v->owner != owner) continue;
   120 			if ((v->type == VEH_TRAIN && IsFrontEngine(v)) ||
   120 			if (IsPlayerBuildableVehicleType(v->type) && v->IsPrimaryVehicle()) {
   121 					 v->type == VEH_ROAD ||
       
   122 					(v->type == VEH_AIRCRAFT && IsNormalAircraft(v)) ||
       
   123 					 v->type == VEH_SHIP) {
       
   124 				num++;
   121 				num++;
   125 				if (v->age > 730) {
   122 				if (v->age > 730) {
   126 					/* Find the vehicle with the lowest amount of profit */
   123 					/* Find the vehicle with the lowest amount of profit */
   127 					if (min_profit_first == true) {
   124 					if (min_profit_first == true) {
   128 						min_profit = v->profit_last_year;
   125 						min_profit = v->profit_last_year;