From bd8a1965f44b224425a004d14286411e7482cb5e Mon Sep 17 00:00:00 2001 From: Z-Kris Date: Sun, 12 Sep 2021 13:32:56 +0300 Subject: [PATCH] Reverse the path prior to returning it cus the pathfinder has it reversed. --- src/main/kotlin/org/rsmod/pathfinder/SmartPathFinder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/org/rsmod/pathfinder/SmartPathFinder.kt b/src/main/kotlin/org/rsmod/pathfinder/SmartPathFinder.kt index 70344b7..ab57c73 100644 --- a/src/main/kotlin/org/rsmod/pathfinder/SmartPathFinder.kt +++ b/src/main/kotlin/org/rsmod/pathfinder/SmartPathFinder.kt @@ -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(