(svn r3036) Use IsCompatibleRail() to check the rail type of level crossings (not a fix, because the old == method works so far)
authortron
Thu, 13 Oct 2005 14:44:03 +0000
changeset 2510 8a959a130698
parent 2509 d293dda5c375
child 2511 0a81d9ca79bc
(svn r3036) Use IsCompatibleRail() to check the rail type of level crossings (not a fix, because the old == method works so far)
train_cmd.c
--- a/train_cmd.c	Thu Oct 13 12:33:03 2005 +0000
+++ b/train_cmd.c	Thu Oct 13 14:44:03 2005 +0000
@@ -2465,8 +2465,10 @@
 		case MP_STREET:
 			// tracks over roads, do owner check of tracks
 			return
-				IsTileOwner(tile, v->owner) &&
-				(v->subtype != TS_Front_Engine || GB(_m[tile].m4, 0, 4) == v->u.rail.railtype);
+				IsTileOwner(tile, v->owner) && (
+					v->subtype != TS_Front_Engine ||
+					IsCompatibleRail(v->u.rail.railtype, GB(_m[tile].m4, 0, 4))
+				);
 
 		default:
 			return true;