summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tunnelbridge_cmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 434f801b2..b37619b22 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -1438,13 +1438,13 @@ TileIndex GetVehicleOutOfTunnelTile(const Vehicle *v)
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;
}