diff options
author | frosch <frosch@openttd.org> | 2009-11-07 22:47:54 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-11-07 22:47:54 +0000 |
commit | ba1fc280e3b0c13baedc2ef54dabb2deec41c818 (patch) | |
tree | f8f51f5d18355d9205052bad2e90e068e9bfacb6 /src/rail.h | |
parent | 7984d90c40f4d55cad9f34d0acac27beb701a63a (diff) | |
download | openttd-ba1fc280e3b0c13baedc2ef54dabb2deec41c818.tar.xz |
(svn r18005) -Codechange: Convert the Prices struct into an array and an enum.
Diffstat (limited to 'src/rail.h')
-rw-r--r-- | src/rail.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rail.h b/src/rail.h index 27b25895d..ae19c97c1 100644 --- a/src/rail.h +++ b/src/rail.h @@ -194,7 +194,7 @@ static inline bool HasPowerOnRail(RailType enginetype, RailType tiletype) static inline Money RailBuildCost(RailType railtype) { assert(railtype < RAILTYPE_END); - return (_price.build_rail * GetRailTypeInfo(railtype)->cost_multiplier) >> 3; + return (_price[PR_BUILD_RAIL] * GetRailTypeInfo(railtype)->cost_multiplier) >> 3; } /** @@ -224,7 +224,7 @@ static inline Money RailConvertCost(RailType from, RailType to) } /* make the price the same as remove + build new type */ - return RailBuildCost(to) + _price.remove_rail; + return RailBuildCost(to) + _price[PR_CLEAR_RAIL]; } Vehicle *UpdateTrainPowerProc(Vehicle *v, void *data); |