You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The old pathfinder (pathfind.c/NTP), in NTPEnum (in 0.4.7), does not check for railtypes. This results in a train favouring the shortest path of rails even if the path contains incompatible railtypes (see the attachment for an example). The train will, sometimes, take the correct route, but with the new pathfinder (NPF) routes it always over the correct route.
There are, as far as I found, three distinct places where the checks need to be added (line numbers indicate start of block in 0.4.7):
The first case (line 718), where the tile is a tunnel tile, exists in both 0.4.7 and the current trunk version.
The second case (line 750), where the tile is not a 'normal (or signalled) rail tile', so a bridge, depot, waypoint or level crossing, exists in both 0.4.7 and the current trunk version. Fixing this can be difficult as you need to get the direction of the train for the bridge to get the correct railtype.
The third case (line 770), where the tile is a normal (or signalled) rail tile is fixed in trunk by rev 4008+4110 (elrails), but it is not backported to 0.4.7. This can therefore easily be fixed by backporting the fix.
Savegame that shows all the failing scenarios. The trains will not always take the wrong route, but it takes the wrong route sometimes after a few tries, while NPF never takes the wrong route after a few tries.
Rubidium opened the ticket and wrote:
Reported version: 0.4.7
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/161
The text was updated successfully, but these errors were encountered: