src/yapf/follow_track.hpp
branchcpp_gui
changeset 6254 abc6ad7c035c
parent 6253 23983700e3d7
child 6268 4b5241e5dd10
child 6447 3b71e57fd22b
equal deleted inserted replaced
6253:23983700e3d7 6254:abc6ad7c035c
   119 	}
   119 	}
   120 
   120 
   121 	/** return true if we can leave m_old_tile in m_exitdir */
   121 	/** return true if we can leave m_old_tile in m_exitdir */
   122 	FORCEINLINE bool CanExitOldTile()
   122 	FORCEINLINE bool CanExitOldTile()
   123 	{
   123 	{
   124 		// road stop can be left at one direction only
   124 		// road stop can be left at one direction only unless it's a drive-through stop
   125 		if (IsRoadTT() && IsRoadStopTile(m_old_tile)) {
   125 		if (IsRoadTT() && IsStandardRoadStopTile(m_old_tile)) {
   126 			DiagDirection exitdir = GetRoadStopDir(m_old_tile);
   126 			DiagDirection exitdir = GetRoadStopDir(m_old_tile);
   127 			if (exitdir != m_exitdir)
   127 			if (exitdir != m_exitdir)
   128 				return false;
   128 				return false;
   129 		}
   129 		}
   130 
   130 
   138 	}
   138 	}
   139 
   139 
   140 	/** return true if we can enter m_new_tile from m_exitdir */
   140 	/** return true if we can enter m_new_tile from m_exitdir */
   141 	FORCEINLINE bool CanEnterNewTile()
   141 	FORCEINLINE bool CanEnterNewTile()
   142 	{
   142 	{
   143 		if (IsRoadTT() && IsRoadStopTile(m_new_tile)) {
   143 		if (IsRoadTT() && IsStandardRoadStopTile(m_new_tile)) {
   144 			// road stop can be entered from one direction only
   144 			// road stop can be entered from one direction only unless it's a drive-through stop
   145 			DiagDirection exitdir = GetRoadStopDir(m_new_tile);
   145 			DiagDirection exitdir = GetRoadStopDir(m_new_tile);
   146 			if (ReverseDiagDir(exitdir) != m_exitdir)
   146 			if (ReverseDiagDir(exitdir) != m_exitdir)
   147 				return false;
   147 				return false;
   148 		}
   148 		}
   149 
   149