diff options
author | tron <tron@openttd.org> | 2006-03-19 12:06:12 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-19 12:06:12 +0000 |
commit | 77e5cf4bc1137805a8e69e6a8ce1370af09dd8d8 (patch) | |
tree | b86bb7662c2be1ce87ebc168346f1677af2a26e4 /clear_cmd.c | |
parent | ba53ec750a05c8e0e316c8f5838cfad7f9fd13de (diff) | |
download | openttd-77e5cf4bc1137805a8e69e6a8ce1370af09dd8d8.tar.xz |
(svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to get information about rail tiles
Diffstat (limited to 'clear_cmd.c')
-rw-r--r-- | clear_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clear_cmd.c b/clear_cmd.c index df24bff56..c7142bb56 100644 --- a/clear_cmd.c +++ b/clear_cmd.c @@ -96,7 +96,7 @@ static int TerraformProc(TerraformerState *ts, TileIndex tile, int mode) return r; if (IsTileType(tile, MP_RAILWAY)) { - static const byte _railway_modes[4] = {8, 0x10, 4, 0x20}; + static const TrackBits _railway_modes[] = { TRACK_BIT_LOWER, TRACK_BIT_LEFT, TRACK_BIT_UPPER, TRACK_BIT_RIGHT }; static const byte _railway_dangslopes[4] = {0xd, 0xe, 7, 0xb}; static const byte _railway_dangslopes2[4] = {0x2, 0x1, 0x8, 0x4}; @@ -113,7 +113,7 @@ static int TerraformProc(TerraformerState *ts, TileIndex tile, int mode) // If we have a single diagonal track there, the other side of // tile can be terraformed. - if ((_m[tile].m5 & ~0x40) == _railway_modes[mode]) { + if (IsPlainRailTile(tile) && GetTrackBits(tile) == _railway_modes[mode]) { if (ts->direction == 1) return 0; skip_clear = true; } |