diff options
author | rubidium <rubidium@openttd.org> | 2007-05-08 16:42:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-08 16:42:48 +0000 |
commit | e6a6d7ef311ff99cf994f14f341a85a8c693c827 (patch) | |
tree | 35880f1ed363515e3b2621026d1ddc666fc29f48 | |
parent | 7b5e3dbb82621ff3c372894db9b8208539cae689 (diff) | |
download | openttd-e6a6d7ef311ff99cf994f14f341a85a8c693c827.tar.xz |
(svn r9815) -Fix (r9761) [FS#769): transfers weren't accounted in the vehicle profits.
-rw-r--r-- | src/economy.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 433dd64e5..eaa0b9657 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1509,9 +1509,10 @@ void VehiclePayment(Vehicle *front_v) 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); |