tunnelbridge_cmd.c
changeset 1041 94db182c3614
parent 1035 812f837ee03f
child 1059 fe97d81a1b4f
--- a/tunnelbridge_cmd.c	Sun Jan 16 13:59:07 2005 +0000
+++ b/tunnelbridge_cmd.c	Sun Jan 16 14:06:22 2005 +0000
@@ -698,7 +698,7 @@
 		int32 cost;
 
 		// check if we own the tile below the bridge..
-		if (_current_player != OWNER_WATER && (!CheckTileOwnership(tile) || !EnsureNoVehicleZ(tile, TileHeight(tile))))
+		if (_current_player != OWNER_WATER && (!CheckTileOwnership(tile) || !EnsureNoVehicleZ(tile, TilePixelHeight(tile))))
 			return CMD_ERROR;
 
 		cost = (_map5[tile] & 8) ? _price.remove_road * 2 : _price.remove_rail;
@@ -711,11 +711,11 @@
 		return cost;
 
 	/* delete canal under bridge */
-	} else if(_map5[tile] == 0xC8 && TileHeight(tile) != 0) {
+	} else if(_map5[tile] == 0xC8 && TilePixelHeight(tile) != 0) {
 		int32 cost;
 
 		// check for vehicles under bridge
-		if (!EnsureNoVehicleZ(tile, TileHeight(tile)))
+		if (!EnsureNoVehicleZ(tile, TilePixelHeight(tile)))
 			return CMD_ERROR;
 		cost = _price.clear_water;
 		if (flags & DC_EXEC) {
@@ -743,7 +743,7 @@
 	*/
 	tile		+= direction ? TILE_XY(0, 1) : TILE_XY( 1,0);
 	endtile	-= direction ? TILE_XY(0, 1) : TILE_XY( 1,0);
-	if ((v = FindVehicleBetween(tile, endtile, TileHeight(tile) + 8)) != NULL) {
+	if ((v = FindVehicleBetween(tile, endtile, TilePixelHeight(tile) + 8)) != NULL) {
 		VehicleInTheWayErrMsg(v);
 		return CMD_ERROR;
 	}
@@ -852,7 +852,7 @@
 	} else if ((_map5[tile] & 0xF8) == 0xE0) {
 		// bridge middle part with rail below
 		// only check for train under bridge
-		if (!CheckTileOwnership(tile) || !EnsureNoVehicleZ(tile, TileHeight(tile)))
+		if (!CheckTileOwnership(tile) || !EnsureNoVehicleZ(tile, TilePixelHeight(tile)))
 			return CMD_ERROR;
 
 		// tile is already of requested type?
@@ -920,7 +920,7 @@
 		z_correction += 8;
 
 	// return the height there (the height of the NORTH CORNER)
-	return TileHeight(tile) + z_correction;
+	return TilePixelHeight(tile) + z_correction;
 }
 
 static const byte _bridge_foundations[2][16] = {