changeset 4283:5179ebca02ec draft

(svn r5913) -Fix (r5906): GetVehicleOutOfTunnelTile did assert when the vehicles tile location is the exit of the tunnel.
author rubidium <rubidium@openttd.org>
date Tue, 15 Aug 2006 14:27:53 +0000
parents bd2df0087692
children 2f410312f6e9
files tunnelbridge_cmd.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -1438,13 +1438,13 @@
 	byte z = v->z_pos;
 
 	dir = ReverseDiagDir(dir);
-	do {
-		tile += delta;
-	} while (
+	while (
 		!IsTunnelTile(tile) ||
 		GetTunnelDirection(tile) != dir ||
 		GetTileZ(tile) != z
-	);
+	) {
+		tile += delta;
+	}
 
 	return tile;
 }