Tile_coord start = dest; dest.tx = -1; dest = Game_object::find_unblocked_tile(start, 0); if (dest.tx != -1) return dest; int dest_tz = start.tz; start.tz = src_tz; dest = Game_object::find_unblocked_tile(start, 0); if (dest.tx != -1) return dest; start.tz = dest_tz;  for (int i = 1; dest.tx == -1 && i < 3; i++) dest = Game_object::find_unblocked_tile(start, i);
Tile_coord start = dest, startz = dest; startz.tz = src_tz; dest.tx = -1; for (int i = 0; dest.tx == -1 && i < 3; i++) { dest = Game_object::find_unblocked_tile(start, i, ht); if (dest.tx == -1) dest = Game_object::find_unblocked_tile(startz, i, ht); }
static Tile_coord Find_unblocked	(	Tile_coord dest,		// Where to go.	int src_tz			// Current lift.	)	{	Tile_coord start = dest;	dest.tx = -1;			// Start at desired position.	dest = Game_object::find_unblocked_tile(start, 0);	if (dest.tx != -1)		return dest;		// Okay.	int dest_tz = start.tz;	start.tz = src_tz;		// Now try at source height.	dest = Game_object::find_unblocked_tile(start, 0);	if (dest.tx != -1)		return dest;		// Okay.	start.tz = dest_tz;					// Look outwards.	for (int i = 1; dest.tx == -1 && i < 3; i++)		dest = Game_object::find_unblocked_tile(start, i);	if (dest.tx == -1)		return start;	else		return dest;	}