diff options
author | smatz <smatz@openttd.org> | 2008-02-13 14:21:36 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-02-13 14:21:36 +0000 |
commit | 507728f46b47ed3a8e941d93d770eb7c04635cd8 (patch) | |
tree | f31f432525a86f656f7d7d5e7c49bbd75af4a86b /src/roadveh_cmd.cpp | |
parent | df7327b4536224a78efab4586ec152ec36bdd982 (diff) | |
download | openttd-507728f46b47ed3a8e941d93d770eb7c04635cd8.tar.xz |
(svn r12129) -Change [FS#1759]: simplified patch settings for pathfinders (Yorick)
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 5a432837c..6c4db3316 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -416,10 +416,10 @@ static const Depot* FindClosestRoadDepot(const Vehicle* v) { TileIndex tile = v->tile; - if (_patches.yapf.road_use_yapf) { + if (_patches.pathfinder_for_roadvehs == VPF_YAPF) { /* YAPF is being used */ Depot* ret = YapfFindNearestRoadDepot(v); return ret; - } else if (_patches.new_pathfinding_all) { + } else if (_patches.pathfinder_for_roadvehs == VPF_NPF) { /* NPF is being used */ NPFFoundTargetData ftd; /* See where we are now */ Trackdir trackdir = GetVehicleTrackdir(v); @@ -431,7 +431,7 @@ static const Depot* FindClosestRoadDepot(const Vehicle* v) return NULL; /* Target not found */ } /* We do not search in two directions here, why should we? We can't reverse right now can we? */ - } else { + } else { /* OPF is being used */ RoadFindDepotData rfdd; rfdd.owner = v->owner; @@ -1217,11 +1217,11 @@ static Trackdir RoadFindPathToDest(Vehicle* v, TileIndex tile, DiagDirection ent return_track(FindFirstBit2x64(trackdirs)); } - if (_patches.yapf.road_use_yapf) { + if (_patches.pathfinder_for_roadvehs == VPF_YAPF) { /* YAPF */ Trackdir trackdir = YapfChooseRoadTrack(v, tile, enterdir); if (trackdir != INVALID_TRACKDIR) return_track(trackdir); return_track(PickRandomBit(trackdirs)); - } else if (_patches.new_pathfinding_all) { + } else if (_patches.pathfinder_for_roadvehs == VPF_NPF) { /* NPF */ NPFFindStationOrTileData fstd; NPFFoundTargetData ftd; Trackdir trackdir; @@ -1243,7 +1243,7 @@ static Trackdir RoadFindPathToDest(Vehicle* v, TileIndex tile, DiagDirection ent to the tile closest to our target. */ return_track(ftd.best_trackdir); } - } else { + } else { /* OPF */ DiagDirection dir; if (IsTileType(desttile, MP_ROAD)) { @@ -1300,7 +1300,7 @@ found_best_track:; static uint RoadFindPathToStop(const Vehicle *v, TileIndex tile) { uint dist; - if (_patches.yapf.road_use_yapf) { + if (_patches.pathfinder_for_roadvehs == VPF_YAPF) { /* use YAPF */ dist = YapfRoadVehDistanceToTile(v, tile); } else { |