Skip to content

Commit fbdf0e1

Browse files
Try to fix discovering waypoint logic (#100)
1 parent 758fd19 commit fbdf0e1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/action/waypoint.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,19 @@ func (b *Builder) useWP(a area.Area) *Chain {
6666
currentWP := area.WPAddresses[a]
6767
if !slices.Contains(d.PlayerUnit.AvailableWaypoints, a) {
6868
for {
69+
traverseAreas = append(currentWP.LinkedFrom, traverseAreas...)
70+
6971
if slices.Contains(d.PlayerUnit.AvailableWaypoints, a) {
7072
break
7173
}
72-
traverseAreas = append(traverseAreas, currentWP.LinkedFrom...)
74+
7375
currentWP = area.WPAddresses[currentWP.LinkedFrom[0]]
7476
a = currentWP.LinkedFrom[0]
7577
}
7678
}
7779

80+
currentWP = area.WPAddresses[a]
81+
7882
// First use the previous available waypoint that we have discovered
7983
actions = append(actions, NewStepChain(func(d data.Data) []step.Step {
8084
return []step.Step{

0 commit comments

Comments
 (0)