summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-11-15 20:47:53 +0000
committermichi_cc <michi_cc@openttd.org>2011-11-15 20:47:53 +0000
commit6548ec6e9ecf0f6d608d0b738213f62b1ce6e584 (patch)
treed8e94705bf49526712eda2cc81588d9b5fac8ee3 /src/economy.cpp
parent88aaeb4092e563f9e894608fc27d507d4693f188 (diff)
downloadopenttd-6548ec6e9ecf0f6d608d0b738213f62b1ce6e584.tar.xz
(svn r23233) -Codechange: Refactor maximum and actually transported cargo amount of towns into a reusable struct.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 48cd28296..9a6dea24d 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -990,8 +990,8 @@ static Money DeliverGoods(int num_pieces, CargoID cargo_type, StationID dest, Ti
/* Increase town's counter for some special goods types */
const CargoSpec *cs = CargoSpec::Get(cargo_type);
- if (cs->town_effect == TE_FOOD) st->town->new_act_food += accepted;
- if (cs->town_effect == TE_WATER) st->town->new_act_water += accepted;
+ if (cs->town_effect == TE_FOOD) st->town->food.new_act += accepted;
+ if (cs->town_effect == TE_WATER) st->town->water.new_act += accepted;
/* Determine profit */
Money profit = GetTransportedGoodsIncome(accepted, DistanceManhattan(source_tile, st->xy), days_in_transit, cargo_type);