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
Improve pathfinder behaviour for finding road depots (fix #7001; see #6410, #6928, #6929) #7009
Conversation
Road vehicles CAN turn around. But NPF didn't reverse the vehicle when the best depot was found on the reversed dir. |
Probably a good idea to test this on some large savegames to check for no unexpected changes in behaviour. Maybe an OTTDCoop save? |
Even as road vehicles can turn around, I wouldn't check two-way for road vehicles when looking for a depot:
I think that disabling two-way checks (as in the current PR) will simplify the whole issue. But I am not fully convinced of this solution. It would be ok that road vehicles checked the opposite direction in some cases, but I don't know whether it is worth it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit messages could possibly be improved ("[NPF] NPF..." seems a bit odd), but the code itself looks fine, to my eyes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the commit messages (rebase -i).
The first commit message talks about "road vehicles" when it should be "road stations". (Road vehicles can never be tiles.)
The last commit should be "Docs" rather than "Fix", suggestion: Docs: Fix spelling in some comments
Also try to find a way to not repeat YAPF and NPF in the other commit messages, it looks very silly with it first in a tag and then first word in the sentence.
…les where to reverse.
… depot when the cost of a path exceeds max. penalty.
… when the cost of a path exceeds max. penalty.
…pot. Road vehicles shouldn't reverse all of a sudden.
This PR tries to fix that:
Also, some minor spelling mistakes on comments.
Please, note that this PR needs an accurate review.
Fix #7001
See #6410 #6928 #6929