Skip to content

Commit

Permalink
Fix boat path finding not working... at all
Browse files Browse the repository at this point in the history
  • Loading branch information
platz1de committed Jan 18, 2025
1 parent 7e21711 commit 3a4e846
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map/area/BoatPathfinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function findPathInArea(start: number, end: number) {
const startX = start % gameMap.width - minX, startY = Math.floor(start / gameMap.width) - minY;
const dx = [0, 1, 0, -1, 1, 1, -1, -1], dy = [-1, 0, 1, 0, -1, 1, 1, -1];
const queue = new PriorityQueue<[number, number, number]>((a, b) => a[2] < b[2]);
const costMap = new Uint16Array(width * height);
const costMap = new Float64Array(width * height);
const parentMap = new Uint16Array(width * height);
onNeighborWater(end, tile => {
queue.push([tile % gameMap.width - minX, Math.floor(tile / gameMap.width) - minY, 0]);
Expand Down

0 comments on commit 3a4e846

Please sign in to comment.