Closed ashley-dv closed 4 years ago
Issue is in src/services/pathfinding/pathfinder.ts
, line 34, as there is no node for the exact position of the client. Using Math.floor on the position fixes the error completely, so to fix, just replace line 34 of pathfinder.ts
with:
const startNode = this.nodes[this.getIndex(Math.floor(start.x), Math.floor(start.y))];
The end point already gets floored in client.findPath.
Version info
8.8.7
X33.1.0
Plugins
client.findPath
Point
fromrealmlib/net
TextPacket
Steps to reproduce
client.findPath({ x: 151, y: 138 });
inonText
hooking toTextPacket
Result
Pathfinding fails with the error:
Very well may be using pathfinding incorrectly, but can't seem to find much documentation on it.