npf.c
changeset 4346 66105d4f6e83
parent 4077 d4d440dd8925
child 4389 18d6ccfb5335
equal deleted inserted replaced
4345:1da147230c79 4346:66105d4f6e83
   790 	init_InsSort(&depots);
   790 	init_InsSort(&depots);
   791 	/* Okay, let's find all depots that we can use first */
   791 	/* Okay, let's find all depots that we can use first */
   792 	FOR_ALL_DEPOTS(depot) {
   792 	FOR_ALL_DEPOTS(depot) {
   793 		/* Check if this is really a valid depot, it is of the needed type and
   793 		/* Check if this is really a valid depot, it is of the needed type and
   794 		 * owner */
   794 		 * owner */
   795 		if (IsValidDepot(depot) && IsTileDepotType(depot->xy, type) && IsTileOwner(depot->xy, owner))
   795 		if (IsTileDepotType(depot->xy, type) && IsTileOwner(depot->xy, owner))
   796 			/* If so, let's add it to the queue, sorted by distance */
   796 			/* If so, let's add it to the queue, sorted by distance */
   797 			depots.push(&depots, depot, DistanceManhattan(tile, depot->xy));
   797 			depots.push(&depots, depot, DistanceManhattan(tile, depot->xy));
   798 	}
   798 	}
   799 
   799 
   800 	/* Now, let's initialise the aystar */
   800 	/* Now, let's initialise the aystar */