mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r5899) - Fix [FS#242]: Multistop not working when using NPF (r5033) (mart3p)
This commit is contained in:
parent
a35511dc9b
commit
ba2a796403
|
@ -1170,7 +1170,7 @@ found_best_track:;
|
||||||
|
|
||||||
static uint RoadFindPathToStop(const Vehicle *v, TileIndex tile)
|
static uint RoadFindPathToStop(const Vehicle *v, TileIndex tile)
|
||||||
{
|
{
|
||||||
uint dist = UINT_MAX;
|
uint dist;
|
||||||
if (_patches.yapf.road_use_yapf) {
|
if (_patches.yapf.road_use_yapf) {
|
||||||
// use YAPF
|
// use YAPF
|
||||||
dist = YapfRoadVehDistanceToTile(v, tile);
|
dist = YapfRoadVehDistanceToTile(v, tile);
|
||||||
|
@ -1178,7 +1178,6 @@ static uint RoadFindPathToStop(const Vehicle *v, TileIndex tile)
|
||||||
// use NPF
|
// use NPF
|
||||||
NPFFindStationOrTileData fstd;
|
NPFFindStationOrTileData fstd;
|
||||||
byte trackdir = GetVehicleTrackdir(v);
|
byte trackdir = GetVehicleTrackdir(v);
|
||||||
uint dist = UINT_MAX;
|
|
||||||
assert(trackdir != 0xFF);
|
assert(trackdir != 0xFF);
|
||||||
|
|
||||||
fstd.dest_coords = tile;
|
fstd.dest_coords = tile;
|
||||||
|
|
Loading…
Reference in New Issue