aboutsummaryrefslogtreecommitdiff
path: root/src/features/waypoints/index.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-20 14:23:35 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-20 14:23:35 +0800
commite08e61e420b520c0442d4302a5db5e9d6f8e9356 (patch)
tree61d14f8336372832184709f6315ece6197844e4b /src/features/waypoints/index.js
parent627cddaf0aaf22058fd9788870a1b5a63502aeff (diff)
downloadSoopyV2-e08e61e420b520c0442d4302a5db5e9d6f8e9356.tar.gz
SoopyV2-e08e61e420b520c0442d4302a5db5e9d6f8e9356.tar.bz2
SoopyV2-e08e61e420b520c0442d4302a5db5e9d6f8e9356.zip
potion time left
Diffstat (limited to 'src/features/waypoints/index.js')
-rw-r--r--src/features/waypoints/index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/features/waypoints/index.js b/src/features/waypoints/index.js
index 41b83d1..ef5a5b8 100644
--- a/src/features/waypoints/index.js
+++ b/src/features/waypoints/index.js
@@ -38,7 +38,7 @@ class Waypoints extends Feature {
this.loadWaypointsFromSendCoords = new ToggleSetting("Load waypoints from /patcher sendcoords messages", "Will dissapear after 1min", true, "load_waypoints_from_sendcoords", this)
this.mineWaypointsSetting = new ToggleSetting("CH waypoints", "Will sync between users", true, "minwaypoints", this)
- this.orderedWaypointsLine = new ToggleSetting("CH waypoints", "Draw a line from current to next ordered waypoint", false, "order_waypoints_line", this)
+ this.orderedWaypointsLine = new ToggleSetting("Ordered waypoints line", "Draw a line from you to next ordered waypoint", false, "order_waypoints_line", this)
try {
this.userWaypoints = JSON.parse(FileLib.read("soopyAddonsData", "soopyv2userwaypoints.json") || "{}")
@@ -206,8 +206,8 @@ class Waypoints extends Feature {
drawCoolWaypoint(nextWaypoint[0], nextWaypoint[1], nextWaypoint[2], 0, 255, 0, { name: nextWaypoint[3] })
}
- if (this.orderedWaypointsLine.getValue() && currentWaypoint && nextWaypoint) {
- drawLine(currentWaypoint[0] + 0.5, currentWaypoint[1], currentWaypoint[2] + 0.5, nextWaypoint[0] + 0.5, nextWaypoint[1], nextWaypoint[2] + 0.5, 0, 255, 0)
+ if (this.orderedWaypointsLine.getValue() && nextWaypoint) {
+ drawLine(Player.getX(), Player.getY(), Player.getZ(), nextWaypoint[0] + 0.5, nextWaypoint[1], nextWaypoint[2] + 0.5, 0, 255, 0)
}
if (this.lastCloser === this.currentOrderedWaypointIndex && distanceTo1 > distanceTo2 && distanceTo2 < 15) {