From baca42a2f84b0f38844d62418dba64a6a21844ac 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 cc3c7f4..92f6475 100644 --- a/src/ruler.js +++ b/src/ruler.js @@ -35,8 +35,13 @@ export class DragRulerRuler extends Ruler { 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; }