Mercurial > hg > openttd
comparison rail_cmd.c @ 3486:d2940b03b6ba draft
(svn r4337) -Fix: A problem where GetRailType was called instead of GetRailTileType. Thanks to glx for noticing
author | celestar <celestar@openttd.org> |
---|---|
date | Sun, 09 Apr 2006 17:50:00 +0000 |
parents | 67144af97951 |
children | 6aef91e18846 |
comparison
equal
deleted
inserted
replaced
3485:7bcf7ae9fe8a | 3486:d2940b03b6ba |
---|---|
1797 static void TileLoop_Track(TileIndex tile) | 1797 static void TileLoop_Track(TileIndex tile) |
1798 { | 1798 { |
1799 byte old_ground; | 1799 byte old_ground; |
1800 byte new_ground; | 1800 byte new_ground; |
1801 | 1801 |
1802 if (GetRailType(tile) == RAIL_TYPE_DEPOT_WAYPOINT) { | 1802 if (GetRailTileType(tile) == RAIL_TYPE_DEPOT_WAYPOINT) { |
1803 old_ground = GB(_m[tile].m4, 0, 4); | 1803 old_ground = GB(_m[tile].m4, 0, 4); |
1804 } else { | 1804 } else { |
1805 old_ground = GB(_m[tile].m2, 0, 4); | 1805 old_ground = GB(_m[tile].m2, 0, 4); |
1806 } | 1806 } |
1807 | 1807 |
1820 } | 1820 } |
1821 break; | 1821 break; |
1822 } | 1822 } |
1823 | 1823 |
1824 // Don't continue tile loop for depots | 1824 // Don't continue tile loop for depots |
1825 if (GetRailType(tile) == RAIL_TYPE_DEPOT_WAYPOINT) return; | 1825 if (GetRailTileType(tile) == RAIL_TYPE_DEPOT_WAYPOINT) return; |
1826 | 1826 |
1827 new_ground = RAIL_GROUND_GREEN; | 1827 new_ground = RAIL_GROUND_GREEN; |
1828 | 1828 |
1829 if (old_ground != RAIL_GROUND_BROWN) { /* wait until bottom is green */ | 1829 if (old_ground != RAIL_GROUND_BROWN) { /* wait until bottom is green */ |
1830 /* determine direction of fence */ | 1830 /* determine direction of fence */ |