(svn r4894) - Backport from trunk (r4750): 0.4
authorDarkvater
Tue, 16 May 2006 22:11:15 +0000
branch0.4
changeset 10012 dddbb8033ba3
parent 10011 66a5c07b4bae
child 10013 b6dc91f0cd71
(svn r4894) - Backport from trunk (r4750):
Trains could enter certain sloped rail tiles under bridges with incompatible rail type
train_cmd.c
--- a/train_cmd.c	Tue May 16 21:38:41 2006 +0000
+++ b/train_cmd.c	Tue May 16 22:11:15 2006 +0000
@@ -2580,9 +2580,9 @@
 				uint tileh = GetTileSlope(tile, &height);
 
 				// correct Z position of a train going under a bridge on slopes
-				if (CorrectZ(tileh)) height += 8;
-
-				if (v->z_pos != height) return true; // train is going over bridge
+				if (tileh != 0) height += TILE_HEIGHT;
+
+				if (v->z_pos > height) return true; // train is going over bridge
 			}
 			break;