From 7fd08de2c3b96d0a171c85513f62a292f232bfe1 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Tue, 27 Sep 2022 16:18:20 +0800 Subject: fix guess thing v2 --- src/features/events/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/events/index.js b/src/features/events/index.js index ab26ce0..8495001 100644 --- a/src/features/events/index.js +++ b/src/features/events/index.js @@ -338,13 +338,13 @@ class Events extends Feature { } getClosestWarp() { - if (!this.guessPoint) return undefined + if (!this.guessPoint2) return undefined let warp = undefined - let minDist = calculateDistance([Player.getX(), Player.getY(), Player.getZ()], this.guessPoint) - 50 + let minDist = calculateDistance([Player.getX(), Player.getY(), Player.getZ()], this.guessPoint2) - 50 this.hasWarps.forEach(w => { if (!warpData[w]) return - let d = calculateDistance(warpData[w], this.guessPoint) + let d = calculateDistance(warpData[w], this.guessPoint2) if (d < minDist) { warp = "warp " + w minDist = d -- cgit