From 3fc315008f6d52c9947a9d577938d15c5821c47a Mon Sep 17 00:00:00 2001 From: Jordan Date: Fri, 2 Feb 2024 22:44:00 -0500 Subject: [PATCH] fix: NaivePathFinder naiveDestination --- README.md | 2 +- package.json | 2 +- src/rsmod/NaivePathFinder.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6c8da27..33311e8 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ https://github.com/wclr/yalc ```shell npm run build # Builds the js bundle and type definitions. yalc publish --push # Publishes to the local repo and pushes to all projects it has been added to. -yalc add rsmod-pathfinder # Adds the published library to your project. +yalc add @2004scape/rsmod-pathfinder # Adds the published library to your project. npm publish --access public # Publishes the version of this to npm. ``` diff --git a/package.json b/package.json index 73c019c..73eda71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@2004scape/rsmod-pathfinder", - "version": "4.2.5", + "version": "4.2.6", "description": "A breadth-first search path finder.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/rsmod/NaivePathFinder.ts b/src/rsmod/NaivePathFinder.ts index 7f91ed8..c931ae0 100644 --- a/src/rsmod/NaivePathFinder.ts +++ b/src/rsmod/NaivePathFinder.ts @@ -34,7 +34,7 @@ export default class NaivePathFinder { const dest: RouteCoordinates = this.cardinalDestination(level, srcX, srcZ); return new Route([dest], false, true); } - const dest: RouteCoordinates = this.naiveDestination(level, srcX, srcZ, srcWidth, srcHeight, destX, destZ, destWidth, destHeight); + const dest: RouteCoordinates = this.naiveDestination(level, srcX, srcZ, srcWidth, srcHeight, destX, destZ, 1, 1); if (this.isDiagonal(dest.x, dest.z, srcWidth, srcHeight, destX, destZ, destWidth, destHeight)) { return new Route([dest], false, true); }