(svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
-Codechange: use IsValidXXX where ever possible Note: both changes to prepare for new pool system, which needs those changes. For every pool there are 2 ugly lines, which will be removed when done implementing new pool system. Based on FS#13 by blathijs, partly implemented.
This commit is contained in:
2
npf.c
2
npf.c
@@ -792,7 +792,7 @@ NPFFoundTargetData NPFRouteToDepotTrialError(TileIndex tile, Trackdir trackdir,
|
||||
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))
|
||||
if (IsTileDepotType(depot->xy, type) && IsTileOwner(depot->xy, owner))
|
||||
/* If so, let's add it to the queue, sorted by distance */
|
||||
depots.push(&depots, depot, DistanceManhattan(tile, depot->xy));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user