Skip to content

Commit

Permalink
Reverse the path prior to returning it cus the pathfinder has it reve…
Browse files Browse the repository at this point in the history
…rsed.
  • Loading branch information
Z-Kris committed Sep 12, 2021
1 parent c7d42ea commit bd8a196
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/org/rsmod/pathfinder/SmartPathFinder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public class SmartPathFinder(
}
nextDir = directions[currLocalX, currLocalY]
}
return Route(coordinates, alternative = !pathFound, success = true)
return Route(coordinates.asReversed(), alternative = !pathFound, success = true)
}

private fun findPath1(
Expand Down

0 comments on commit bd8a196

Please sign in to comment.