summaryrefslogtreecommitdiff
path: root/src/yapf/follow_track.hpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-02-20 17:49:50 +0000
committerfrosch <frosch@openttd.org>2008-02-20 17:49:50 +0000
commitb7993793c813359ba4963df93d49a80335ddca36 (patch)
treed325400c42801ac23226ccaf0d71008e4e3598ec /src/yapf/follow_track.hpp
parent9e651575481dbdd4b587fe22e2d79b998bcbbe15 (diff)
downloadopenttd-b7993793c813359ba4963df93d49a80335ddca36.tar.xz
(svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus().
Diffstat (limited to 'src/yapf/follow_track.hpp')
-rw-r--r--src/yapf/follow_track.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/yapf/follow_track.hpp b/src/yapf/follow_track.hpp
index 07a6b15b3..6987c24a4 100644
--- a/src/yapf/follow_track.hpp
+++ b/src/yapf/follow_track.hpp
@@ -64,7 +64,7 @@ struct CFollowTrackT : public FollowTrack_t
m_old_tile = old_tile;
m_old_td = old_td;
m_err = EC_NONE;
- assert(((GetTileTrackStatus(m_old_tile, TT(), m_veh->u.road.compatible_roadtypes) & TrackdirToTrackdirBits(m_old_td)) != 0) ||
+ assert(((TrackStatusToTrackdirBits(GetTileTrackStatus(m_old_tile, TT(), m_veh->u.road.compatible_roadtypes)) & TrackdirToTrackdirBits(m_old_td)) != 0) ||
(GetSingleTramBit(m_old_tile) != INVALID_DIAGDIR)); // Disable the assertion for single tram bits
m_exitdir = TrackdirToExitdir(m_old_td);
if (ForcedReverse()) return true;
@@ -133,8 +133,7 @@ protected:
if (IsRailTT() && GetTileType(m_new_tile) == MP_RAILWAY && IsPlainRailTile(m_new_tile)) {
m_new_td_bits = (TrackdirBits)(GetTrackBits(m_new_tile) * 0x101);
} else {
- uint32 ts = GetTileTrackStatus(m_new_tile, TT(), m_veh->u.road.compatible_roadtypes);
- m_new_td_bits = (TrackdirBits)(ts & TRACKDIR_BIT_MASK);
+ m_new_td_bits = TrackStatusToTrackdirBits(GetTileTrackStatus(m_new_tile, TT(), m_veh->u.road.compatible_roadtypes));
if (m_new_td_bits == 0) {
/* GetTileTrackStatus() returns 0 for single tram bits.