diff options
author | rubidium <rubidium@openttd.org> | 2008-08-02 22:48:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-08-02 22:48:57 +0000 |
commit | d6645818b4b29a42dd617c92e23a525fe5170b6a (patch) | |
tree | 9b423b584c96b7a05e9686e33d0f76540f794cfd /src/rail_map.h | |
parent | fe4f23dba23ba7553304961773a74bc1037e12a7 (diff) | |
download | openttd-d6645818b4b29a42dd617c92e23a525fe5170b6a.tar.xz |
(svn r13933) -Codechange [YAPP]: Handle through and PBS signals correctly in the signal code. (michi_cc)
Diffstat (limited to 'src/rail_map.h')
-rw-r--r-- | src/rail_map.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rail_map.h b/src/rail_map.h index 2d25feb5a..8e47ea5f5 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -368,6 +368,12 @@ static inline bool IsPresignalExit(TileIndex t, Track track) return GetSignalType(t, track) == SIGTYPE_EXIT || GetSignalType(t, track) == SIGTYPE_COMBO; } +/** One-way signals can't be passed the 'wrong' way. */ +static inline bool IsOnewaySignal(TileIndex t, Track track) +{ + return GetSignalType(t, track) != SIGTYPE_PBS; +} + static inline void CycleSignalSide(TileIndex t, Track track) { byte sig; |