diff options
author | michi_cc <michi_cc@openttd.org> | 2011-12-19 14:24:12 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2011-12-19 14:24:12 +0000 |
commit | aba9f98a73a065ecb79ea129f23d7c982df42e0d (patch) | |
tree | 5f944a590e165423c50b39ae55577113800bb262 /src/rail_cmd.cpp | |
parent | b827694aecfb442471a9f50aec09f116a35071cd (diff) | |
download | openttd-aba9f98a73a065ecb79ea129f23d7c982df42e0d.tar.xz |
(svn r23593) -Fix (r23411): Infrastructure counts for rail were not properly updated when converting rail or building level crossings.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index d4442a9b9..afa071b14 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1532,7 +1532,7 @@ CommandCost CmdConvertRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 } /* Update the company infrastructure counters. */ - if (IsRailStationTile(tile) && !IsStationTileBlocked(tile)) { + if (!IsRailStationTile(tile) || !IsStationTileBlocked(tile)) { Company *c = Company::Get(GetTileOwner(tile)); uint num_pieces = IsLevelCrossingTile(tile) ? LEVELCROSSING_TRACKBIT_FACTOR : 1; if (IsPlainRailTile(tile)) { |