summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-09-07 07:39:08 +0000
committersmatz <smatz@openttd.org>2009-09-07 07:39:08 +0000
commit22e9d595591dab19e9d37a42f8d529570f582847 (patch)
tree066e3cee3770b84cb97671dd3bffa78f7df61882 /src/economy.cpp
parent9168ddd5507026b6346797f48bd0853091cbcb4e (diff)
downloadopenttd-22e9d595591dab19e9d37a42f8d529570f582847.tar.xz
(svn r17439) -Fix (r17436): you weren't paid for cargo delivered to houses and headquarters anymore
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 0b1fd030e..07fefdac1 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -929,6 +929,9 @@ static Money DeliverGoods(int num_pieces, CargoID cargo_type, StationID dest, Ti
/* Give the goods to the industry. */
uint accepted = DeliverGoodsToIndustry(st, cargo_type, num_pieces, src_type == ST_INDUSTRY ? src : INVALID_INDUSTRY);
+ /* If there are non-industries around accepting the cargo, accept it all */
+ if (HasBit(st->town_acc, cargo_type)) accepted = num_pieces;
+
/* Determine profit */
Money profit = GetTransportedGoodsIncome(accepted, DistanceManhattan(source_tile, st->xy), days_in_transit, cargo_type);