From 310014bb8ab4117ea9cd8378c57e078739884f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Wed, 26 May 2021 16:40:24 +0200 Subject: [PATCH] Broadcast pathfinding waypoints to other players --- src/ruler.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ruler.js b/src/ruler.js index 5163a47..896246c 100644 --- a/src/ruler.js +++ b/src/ruler.js @@ -32,8 +32,13 @@ export function extendRuler() { const json = super.toJSON(); if (this.draggedEntity) { const isToken = this.draggedEntity instanceof Token; - json["draggedEntityIsToken"] = isToken; - json["draggedEntity"] = this.draggedEntity.id; + json.draggedEntityIsToken = isToken; + json.draggedEntity = this.draggedEntity.id; + json.waypoints = json.waypoints.map(old => { + let w = duplicate(old); + w.isPathfinding = undefined; + return w; + }); } return json; }