diff src/roadveh_cmd.cpp @ 10230:41a155ef824c draft

(svn r14458) -Fix [FS#2341](r14368): crash when there was a tram dead end after a station/tunnel/bridge (frosch123 and Rubidium)
author smatz <smatz@openttd.org>
date Fri, 10 Oct 2008 22:50:31 +0000
parents 39cf8eebfda5
children 7295d5a4ed10
line wrap: on
line diff
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1487,7 +1487,7 @@
 					 *   going to cause the tram to split up.
 					 * - Or the front of the tram can drive over the next tile.
 					 */
-				} else if (!IsRoadVehFront(v) || !CanBuildTramTrackOnTile(v->owner, tile, needed) || ((~needed & GetRoadBits(v->tile, ROADTYPE_TRAM)) == ROAD_NONE)) {
+				} else if (!IsRoadVehFront(v) || !CanBuildTramTrackOnTile(v->owner, tile, needed) || ((~needed & GetAnyRoadBits(v->tile, ROADTYPE_TRAM, false)) == ROAD_NONE)) {
 					/*
 					 * Taking the 'small' corner for trams only happens when:
 					 * - We are not the from vehicle of an articulated tram.