diff options
author | rubidium <rubidium@openttd.org> | 2013-11-25 11:11:56 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-25 11:11:56 +0000 |
commit | e106e54f9fa96905ccbbb4f205a473ec3ce6d9a3 (patch) | |
tree | 5b356f4cf461254e56f766cdff1331e9b50d5534 /src | |
parent | 18beaac57180d3b3020ec34e318c7d7aa805fd12 (diff) | |
download | openttd-e106e54f9fa96905ccbbb4f205a473ec3ce6d9a3.tar.xz |
(svn r26102) -Fix: m_veh is not NULL by definition when IsRoadTT is true
Diffstat (limited to 'src')
-rw-r--r-- | src/pathfinder/follow_track.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp index 3fdc3f1f8..629fb9654 100644 --- a/src/pathfinder/follow_track.hpp +++ b/src/pathfinder/follow_track.hpp @@ -121,7 +121,7 @@ struct CFollowTrackT m_old_tile = old_tile; m_old_td = old_td; m_err = EC_NONE; - assert(((TrackStatusToTrackdirBits(GetTileTrackStatus(m_old_tile, TT(), IsRoadTT() && m_veh != NULL ? RoadVehicle::From(m_veh)->compatible_roadtypes : 0)) & TrackdirToTrackdirBits(m_old_td)) != 0) || + assert(((TrackStatusToTrackdirBits(GetTileTrackStatus(m_old_tile, TT(), IsRoadTT() ? RoadVehicle::From(m_veh)->compatible_roadtypes : 0)) & TrackdirToTrackdirBits(m_old_td)) != 0) || (IsTram() && GetSingleTramBit(m_old_tile) != INVALID_DIAGDIR)); // Disable the assertion for single tram bits m_exitdir = TrackdirToExitdir(m_old_td); if (ForcedReverse()) return true; @@ -233,7 +233,7 @@ protected: if (IsRailTT() && IsPlainRailTile(m_new_tile)) { m_new_td_bits = (TrackdirBits)(GetTrackBits(m_new_tile) * 0x101); } else { - m_new_td_bits = TrackStatusToTrackdirBits(GetTileTrackStatus(m_new_tile, TT(), IsRoadTT() && m_veh != NULL ? RoadVehicle::From(m_veh)->compatible_roadtypes : 0)); + m_new_td_bits = TrackStatusToTrackdirBits(GetTileTrackStatus(m_new_tile, TT(), IsRoadTT() ? RoadVehicle::From(m_veh)->compatible_roadtypes : 0)); if (IsTram() && m_new_td_bits == 0) { /* GetTileTrackStatus() returns 0 for single tram bits. |