New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YAPF can't find road depot, but NPF can #7001
Comments
To Reproduce (OTTD 1.8.0, Win 7 Ultimate):
. |
Reproduced per the above in a recent development build. The issue is not specific to NE-SW directions, it also reproduces in NW-SE directions. |
Possible Fix: Instead of checking just the pathfinder defined in the game settings (ethier YAPF or NPF), also check the other pathfinder for a valid go-to-depot location/route before returning the error (YAPF and then NPF if YAPF is selected or vice versa). Only if both pathfinders fail to find a suitable depot location for the go-to-nearest-depot order will the "Unable to find [route to] local depot" error be thrown. |
That is not acceptable. |
There are several problems here:
So, the three of them should be addressed. I attach two savegames where the bus shouldn't find any depot. NPF finds depot#1, but depot#2 is closest. YAPF returns depot#2, which is the closest one, but I think it shouldn't have found it as it is too far away. Something like this on follow_track.hpp would solve the first problem (probably there are better ways of writing it):
The other two issues should be considered as well. I have a patch for the max. distance problem and I will also look for a solution for the two-way problem with NPF. |
This would be a nice one to fix 👍 Inability for RVs to find depots is the principal reason I play with breakdowns off. That in turn distorts how I design newgrf vehicles 🤦♂️ 🤦♀️ Might be interesting to re-run train pathfinder when it needs to find a depot on a PBS route, but eh, different issue. |
…les where to reverse.
…les where to reverse.
…les where to reverse.
The text was updated successfully, but these errors were encountered: