Skip to content

Commit

Permalink
fix: NaivePathFinder naiveDestination
Browse files Browse the repository at this point in the history
  • Loading branch information
ultraviolet-jordan committed Feb 3, 2024
1 parent 1114386 commit 3fc3150
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/rsmod/NaivePathFinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3fc3150

Please sign in to comment.