summaryrefslogtreecommitdiff
path: root/rail_cmd.c
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-12-29 16:40:22 +0000
committerrubidium <rubidium@openttd.org>2006-12-29 16:40:22 +0000
commitd42ee81f7996f5d62d843e004338903cb9d05cc7 (patch)
tree4bd722ccb1445a7cdf27d4c72aedc9daa02cff7b /rail_cmd.c
parentdaf71e7ef89c73ccd643eea407a6ff6dc941992e (diff)
downloadopenttd-d42ee81f7996f5d62d843e004338903cb9d05cc7.tar.xz
(svn r7617) -Fix (7609): GetTrackBits only works (as intended) for plain rail tiles, so get the trackbits if it is certain it is a plain rail tile. Noticed by Tron.
Diffstat (limited to 'rail_cmd.c')
-rw-r--r--rail_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index dcc749310..a793bb8a5 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -967,7 +967,6 @@ static int32 ClearTile_Track(TileIndex tile, byte flags)
{
int32 cost;
int32 ret;
- TrackBits tracks = GetTrackBits(tile);
if (flags & DC_AUTO) {
if (!IsTileOwner(tile, _current_player))
@@ -985,6 +984,7 @@ static int32 ClearTile_Track(TileIndex tile, byte flags)
switch (GetRailTileType(tile)) {
case RAIL_TILE_SIGNALS:
case RAIL_TILE_NORMAL: {
+ TrackBits tracks = GetTrackBits(tile);
uint i;
for_each_bit (i, tracks) {