aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-03 12:07:37 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-03 12:07:37 +0800
commitac1fb62d61fa6a16a43667ac4f16c324f806a54e (patch)
treed71a14feb5211ed18c2ccf4d9395c5197884cc4a /features
parent5a33d1074844894c638fab1e4421def3c0987831 (diff)
downloadSoopyV2-ac1fb62d61fa6a16a43667ac4f16c324f806a54e.tar.gz
SoopyV2-ac1fb62d61fa6a16a43667ac4f16c324f806a54e.tar.bz2
SoopyV2-ac1fb62d61fa6a16a43667ac4f16c324f806a54e.zip
fix patcher waypoints sometimes not dissapearing
Diffstat (limited to 'features')
-rw-r--r--features/waypoints/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/features/waypoints/index.js b/features/waypoints/index.js
index 7c240ce..d5957e7 100644
--- a/features/waypoints/index.js
+++ b/features/waypoints/index.js
@@ -76,6 +76,8 @@ class Waypoints extends Feature {
if (this.showInfoInChat.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + "Deleted waypoint " + name + "!")
})
this.registerCommand("clearwaypoints", () => {
+ this.userWaypointsAll.forEach(w => w.stopRender())
+ Object.values(this.userWaypointsHash).forEach(a => a.forEach(w => w.stopRender()))
this.userWaypoints = {}
this.userWaypointsArr = []
this.waypointsChanged = true
@@ -104,14 +106,14 @@ class Waypoints extends Feature {
this.registerChat("&r${*} &8> ${player}&f: &rx: ${x}, y: ${y}, z: ${z}", (player, x, y, z, e) => {
if (this.loadWaypointsFromSendCoords.getValue()) {
this.patcherWaypoints.push([Date.now(), new Waypoint(parseInt(x), parseInt(y), parseInt(ChatLib.removeFormatting(z)), 0, 0, 1, { name: ChatLib.addColor(player), showDist: true }).startRender()])
- if (this.patcherWaypoints.length > 10) this.patcherWaypoints.shift()
+ if (this.patcherWaypoints.length > 10) this.patcherWaypoints.shift()[1].stopRender()
}
})
this.registerChat("${player}&r&f: x: ${x}, y: ${y}, z: ${z}", (player, x, y, z, e) => {
if (player.includes(">")) return
if (this.loadWaypointsFromSendCoords.getValue()) {//parseInt(x), parseInt(y), parseInt(ChatLib.removeFormatting(z)), ChatLib.addColor(player)
this.patcherWaypoints.push([Date.now(), new Waypoint(parseInt(x), parseInt(y), parseInt(ChatLib.removeFormatting(z)), 0, 0, 1, { name: ChatLib.addColor(player), showDist: true }).startRender()])
- if (this.patcherWaypoints.length > 10) this.patcherWaypoints.shift()
+ if (this.patcherWaypoints.length > 10) this.patcherWaypoints.shift()[1].stopRender()
}
})