src/economy.cpp
changeset 7097 1ad633b5a2cd
parent 7076 3bc104d72eef
child 7105 1287fa220aec
equal deleted inserted replaced
7096:fd549da22194 7097:1ad633b5a2cd
  1507 					/* pay transfer vehicle for only the part of transfer it has done: ie. cargo_loaded_at_xy to here */
  1507 					/* pay transfer vehicle for only the part of transfer it has done: ie. cargo_loaded_at_xy to here */
  1508 					DistanceManhattan(v->cargo_loaded_at_xy, GetStation(last_visited)->xy),
  1508 					DistanceManhattan(v->cargo_loaded_at_xy, GetStation(last_visited)->xy),
  1509 					v->cargo_days,
  1509 					v->cargo_days,
  1510 					v->cargo_type);
  1510 					v->cargo_type);
  1511 
  1511 
  1512 				ge->feeder_profit        += v->cargo_feeder_share; // transfer cargo transfer fees to station
  1512 				front_v->profit_this_year += virtual_profit;
  1513 				total_cargo_feeder_share -= v->cargo_feeder_share; // accumulate deduction of feeder shares
  1513 				ge->feeder_profit         += v->cargo_feeder_share + virtual_profit; // transfer cargo transfer fees to station
  1514 				v->cargo_feeder_share     = 0;                     // clear transfer cost
  1514 				total_cargo_feeder_share  -= v->cargo_feeder_share; // accumulate deduction of feeder shares
       
  1515 				v->cargo_feeder_share      = 0;                     // clear transfer cost
  1515 
  1516 
  1516 				/* keep total of cargo unloaded (pending) for accurate cargoshare calculation on load */
  1517 				/* keep total of cargo unloaded (pending) for accurate cargoshare calculation on load */
  1517 				SB(ge->unload_pending, 0, 12, GB(ge->unload_pending, 0, 12) + v->cargo_count);
  1518 				SB(ge->unload_pending, 0, 12, GB(ge->unload_pending, 0, 12) + v->cargo_count);
  1518 
  1519 
  1519 				virtual_profit_total += virtual_profit;   // accumulate transfer profits for whole vehicle
  1520 				virtual_profit_total += virtual_profit;   // accumulate transfer profits for whole vehicle