(svn r6226) -Fix(r5864): an assertion was triggered when drawing catenary on steep slopes (TrueLight)
authorglx
Tue, 29 Aug 2006 21:34:02 +0000
changeset 4448 3856ddf73609
parent 4447 d196eec23f9f
child 4449 7b1d5a6d15be
(svn r6226) -Fix(r5864): an assertion was triggered when drawing catenary on steep slopes (TrueLight)
elrail.c
--- a/elrail.c	Tue Aug 29 20:55:25 2006 +0000
+++ b/elrail.c	Tue Aug 29 21:34:02 2006 +0000
@@ -228,7 +228,7 @@
 		if (IsTileType(neighbour, MP_STATION)) tileh[TS_NEIGHBOUR] = SLOPE_FLAT;
 
 		/* Read the foundataions if they are present, and adjust the tileh */
-		if (IsTileType(neighbour, MP_RAILWAY)) foundation = GetRailFoundation(tileh[TS_NEIGHBOUR], trackconfig[TS_NEIGHBOUR]);
+		if (IsTileType(neighbour, MP_RAILWAY) && GetRailType(neighbour) == RAILTYPE_ELECTRIC) foundation = GetRailFoundation(tileh[TS_NEIGHBOUR], trackconfig[TS_NEIGHBOUR]);
 		if (IsBridgeTile(neighbour) && IsBridgeRamp(neighbour)) {
 			foundation = GetBridgeFoundation(tileh[TS_NEIGHBOUR], DiagDirToAxis(GetBridgeRampDirection(neighbour)));
 		}