(svn r9815) -Fix (r9761) [FS#769): transfers weren't accounted in the vehicle profits.
authorrubidium
Tue, 08 May 2007 16:42:48 +0000
changeset 7097 1ad633b5a2cd
parent 7096 fd549da22194
child 7098 cfa4db4b59f7
(svn r9815) -Fix (r9761) [FS#769): transfers weren't accounted in the vehicle profits.
src/economy.cpp
--- a/src/economy.cpp	Tue May 08 14:28:55 2007 +0000
+++ b/src/economy.cpp	Tue May 08 16:42:48 2007 +0000
@@ -1509,9 +1509,10 @@
 					v->cargo_days,
 					v->cargo_type);
 
-				ge->feeder_profit        += v->cargo_feeder_share; // transfer cargo transfer fees to station
-				total_cargo_feeder_share -= v->cargo_feeder_share; // accumulate deduction of feeder shares
-				v->cargo_feeder_share     = 0;                     // clear transfer cost
+				front_v->profit_this_year += virtual_profit;
+				ge->feeder_profit         += v->cargo_feeder_share + virtual_profit; // transfer cargo transfer fees to station
+				total_cargo_feeder_share  -= v->cargo_feeder_share; // accumulate deduction of feeder shares
+				v->cargo_feeder_share      = 0;                     // clear transfer cost
 
 				/* keep total of cargo unloaded (pending) for accurate cargoshare calculation on load */
 				SB(ge->unload_pending, 0, 12, GB(ge->unload_pending, 0, 12) + v->cargo_count);