(svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to get information about rail tiles

This commit is contained in:
tron
2006-03-19 12:06:12 +00:00
parent ba53ec750a
commit 77e5cf4bc1
10 changed files with 66 additions and 63 deletions

View File

@@ -2652,7 +2652,8 @@ static const DiagDirection _otherside_signal_directions[] = {
static void TrainMovedChangeSignals(TileIndex tile, DiagDirection dir)
{
if (IsTileType(tile, MP_RAILWAY) && (_m[tile].m5 & 0xC0) == 0x40) {
if (IsTileType(tile, MP_RAILWAY) &&
GetRailTileType(tile) == RAIL_TYPE_SIGNALS) {
uint i = FindFirstBit2x64((_m[tile].m5 + (_m[tile].m5 << 8)) & _reachable_tracks[dir]);
UpdateSignalsOnSegment(tile, _otherside_signal_directions[i]);
}