(svn r10103) -Fix (r10086): TrackBitsToTrack doesn't cope well with TRACK_BIT_NONE (e.g. non-rail tiles), so use FindFirstTrack instead.
authormaedhros
Mon, 11 Jun 2007 16:41:34 +0000
changeset 6863 746e9481a436
parent 6862 8c54e0f4c882
child 6864 fc33b39c585f
(svn r10103) -Fix (r10086): TrackBitsToTrack doesn't cope well with TRACK_BIT_NONE (e.g. non-rail tiles), so use FindFirstTrack instead.
src/rail_gui.cpp
--- a/src/rail_gui.cpp	Mon Jun 11 15:14:57 2007 +0000
+++ b/src/rail_gui.cpp	Mon Jun 11 16:41:34 2007 +0000
@@ -175,7 +175,7 @@
 		trackbits = (_tile_fract_coords.x + _tile_fract_coords.y <= 15) ? TRACK_BIT_UPPER : TRACK_BIT_LOWER;
 	}
 
-	Track track = TrackBitsToTrack(trackbits);
+	Track track = FindFirstTrack(trackbits);
 
 	if (!_remove_button_clicked) {
 		uint32 p1 = track;