Changeset - r1339:5cb3b503d366
[Not reviewed]
master
0 1 0
matthijs - 19 years ago 2005-02-07 19:01:56
matthijs@openttd.org
(svn r1843) - Codechange: [NPF] Removed some unused code.
1 file changed with 0 insertions and 12 deletions:
npf.c
12
0 comments (0 inline, 0 general)
npf.c
Show inline comments
 
@@ -593,32 +593,20 @@ NPFFoundTargetData NPFRouteToDepotTrialE
 
	 * the next closest, etc. We stop when the best route we have found so
 
	 * far, is shorter than the manhattan distance. This will obviously
 
	 * always find the closest depot. It will probably be most efficient
 
	 * for ships, since the heuristic will not be to far off then. I hope.
 
	 */
 
	Queue depots;
 
	TileType tiletype = 0;
 
	int r;
 
	NPFFoundTargetData best_result;
 
	NPFFoundTargetData result;
 
	NPFFindStationOrTileData target;
 
	AyStarNode start;
 
	Depot* current;
 
	Depot *depot;
 

	
 

	
 
	/* This is a little ugly, but it works :-S */
 
	if (type == TRANSPORT_ROAD)
 
		tiletype = MP_STREET;
 
	else if (type == TRANSPORT_RAIL)
 
		tiletype = MP_RAILWAY;
 
	else if (type == TRANSPORT_WATER)
 
		tiletype = MP_WATER;
 
	else
 
		assert(0);
 

	
 
	init_InsSort(&depots);
 
	/* Okay, let's find all depots that we can use first */
 
	FOR_ALL_DEPOTS(depot) {
 
		/* Check if this is really a valid depot, it is of the needed type and
 
		 * owner */
 
		if (IsValidDepot(depot) && IsTileDepotType(depot->xy, type) && IsTileOwner(depot->xy, owner))
0 comments (0 inline, 0 general)