changeset 3912:e55b58cd04da draft

(svn r5013) -Fix: [YAPF] RVs trying to plan route through railway. Should fix assert("(GetTileTrackStatus(m_old_tile, TT()) & TrackdirToTrackdirBits(m_old_td)) != 0") Thanks Celestar for the reproducible case.
author KUDr <KUDr@openttd.org>
date Mon, 29 May 2006 15:04:42 +0000
parents d1ba5711f911
children e07beca4cf6f
files yapf/follow_track.hpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/yapf/follow_track.hpp
+++ b/yapf/follow_track.hpp
@@ -85,7 +85,7 @@
 	FORCEINLINE bool QueryNewTileTrackStatus()
 	{
 		CPerfStart perf(*m_pPerf);
-		if (GetTileType(m_new_tile) == MP_RAILWAY && IsPlainRailTile(m_new_tile)) {
+		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());