src/yapf/follow_track.hpp
changeset 9112 ec6800eaa340
parent 9059 04edde3eb0c6
child 9132 6256752d5e80
--- a/src/yapf/follow_track.hpp	Wed Feb 20 17:12:08 2008 +0000
+++ b/src/yapf/follow_track.hpp	Wed Feb 20 17:49:50 2008 +0000
@@ -64,7 +64,7 @@
 		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 @@
 		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.