(svn r23593) -Fix (r23411): Infrastructure counts for rail were not properly updated when converting rail or building level crossings.

This commit is contained in:
michi_cc
2011-12-19 14:24:12 +00:00
parent 7cfe482045
commit 06ffcf0ae8
2 changed files with 11 additions and 1 deletions

View File

@@ -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)) {