diff options
author | frosch <frosch@openttd.org> | 2009-05-15 16:07:36 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-05-15 16:07:36 +0000 |
commit | 8ffb93c358c80fc24e349ad232648087508deec6 (patch) | |
tree | 05009b41503e46ed5e5a6edfa56f11dadafa66d9 /src/rail_map.h | |
parent | 683a6ca039fb0c52093dd93261b6233dd6f482f3 (diff) | |
download | openttd-8ffb93c358c80fc24e349ad232648087508deec6.tar.xz |
(svn r16311) -Fix: (Get|Set)TrackBits() is only valid for RAIL_TILE_NORMAL and _SIGNALS.
Diffstat (limited to 'src/rail_map.h')
-rw-r--r-- | src/rail_map.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rail_map.h b/src/rail_map.h index 7c8c31f85..195aef9f5 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -141,6 +141,7 @@ static inline void SetRailType(TileIndex t, RailType r) */ static inline TrackBits GetTrackBits(TileIndex tile) { + assert(IsPlainRailTile(tile)); return (TrackBits)GB(_m[tile].m5, 0, 6); } @@ -151,6 +152,7 @@ static inline TrackBits GetTrackBits(TileIndex tile) */ static inline void SetTrackBits(TileIndex t, TrackBits b) { + assert(IsPlainRailTile(t)); SB(_m[t].m5, 0, 6, b); } |