Bug #8701

AIRoad.CanBuildConnectedRoadPartsHere

Added by Zuu 3 months ago. Updated 3 months ago.

Status:NewStart date:2020-03-31
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

<Samu> https://dev.openttdcoop.org/projects/lib-pathfinderroad/repository/entry/main.nut#L257
<Samu> AIRoad.CanBuildConnectedRoadPartsHere can return -1
<Samu> line needs to be changed to AIRoad.CanBuildConnectedRoadPartsHere(cur_node, path.GetParent().GetTile(), next_tile) > 1
<Samu> can you change it? it says you're project manager
<Samu> i mean > 0
<Samu> then i guess superlib would also needs fixed
...
<Samu> CanBuildConnectedRoadParts can in fact return -1, 0, 1 and 2
...
<Samu> there has been a recent fix regarding that function on OpenTTD side, so it's kind of relevant if it was also fixed in the library
<Samu> it still works, doesn't appear to be breaking AIs, but, it's accepting -1 as true

History

#1 Updated by Zuu 3 months ago

<Samu> btw, you may add this link https://github.com/OpenTTD/OpenTTD/pull/8036
<Samu> makes it easier to understand what's solved

Also available in: Atom PDF