diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/features/waypoints/index.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/features/waypoints/index.js b/src/features/waypoints/index.js index 9188ddf..15843b5 100644 --- a/src/features/waypoints/index.js +++ b/src/features/waypoints/index.js @@ -153,6 +153,11 @@ class Waypoints extends Feature { console.log(e.stack) } }) + this.registerCommand("clearorderedwaypoints", () => { + this.currentOrderedWaypointIndex = -1 + this.orderedWaypoints.clear() + if (this.showInfoInChat.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + "Cleared waypoints!") + }) this.registerCommand("setorderwaypointindex", (ind) => { this.currentOrderedWaypointIndex = parseInt(ind) if (this.showInfoInChat.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + "Set index to " + ind + "!") @@ -353,6 +358,7 @@ class Waypoints extends Feature { this.registerEvent("worldLoad", () => { this.locations = {} + if (this.currentOrderedWaypointIndex >= 0) this.currentOrderedWaypointIndex = 0 }) } |