tunnelbridge_cmd.c
changeset 4231 dea6a63dd058
parent 4191 25538ade07c2
child 4239 9ec74a9b8b58
--- a/tunnelbridge_cmd.c	Sun Aug 06 08:23:19 2006 +0000
+++ b/tunnelbridge_cmd.c	Sun Aug 06 16:32:49 2006 +0000
@@ -1089,13 +1089,13 @@
 	}
 }
 
-static uint GetSlopeZ_TunnelBridge(const TileInfo* ti)
+static uint GetSlopeZ_TunnelBridge(TileIndex tile, uint x, uint y)
 {
-	TileIndex tile = ti->tile;
-	uint z = ti->z;
-	uint x = ti->x & 0xF;
-	uint y = ti->y & 0xF;
-	Slope tileh = ti->tileh;
+	uint z;
+	Slope tileh = GetTileSlope(tile, &z);
+
+	x &= 0xF;
+	y &= 0xF;
 
 	if (IsTunnel(tile)) {
 		uint pos = (DiagDirToAxis(GetTunnelDirection(tile)) == AXIS_X ? y : x);