diff options
author | michi_cc <michi_cc@openttd.org> | 2012-02-11 22:43:39 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2012-02-11 22:43:39 +0000 |
commit | 0542e26460cf5da6fb4a3486ed9b515721bdb0bd (patch) | |
tree | 901640a66314b34ff1bc6a72b67dc288683a79c9 /src/economy.cpp | |
parent | 1cf2f521ab32279b6770a79e7fb50ef5bbcd4011 (diff) | |
download | openttd-0542e26460cf5da6fb4a3486ed9b515721bdb0bd.tar.xz |
(svn r23931) -Change: Scale infrastructure cost of rail tracks by the total number of all tracks and not independently for each rail type.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 6e08b8638..e449465f8 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -597,8 +597,9 @@ static void CompaniesGenStatistics() cur_company.Change(c->index); CommandCost cost(EXPENSES_PROPERTY); + uint32 rail_total = c->infrastructure.GetRailTotal(); for (RailType rt = RAILTYPE_BEGIN; rt < RAILTYPE_END; rt++) { - if (c->infrastructure.rail[rt] != 0) cost.AddCost(RailMaintenanceCost(rt, c->infrastructure.rail[rt])); + if (c->infrastructure.rail[rt] != 0) cost.AddCost(RailMaintenanceCost(rt, c->infrastructure.rail[rt], rail_total)); } cost.AddCost(SignalMaintenanceCost(c->infrastructure.signal)); for (RoadType rt = ROADTYPE_BEGIN; rt < ROADTYPE_END; rt++) { |