Broadcast pathfinding waypoints to other players

This commit is contained in:
Manuel Vögele
2021-05-26 16:40:24 +02:00
parent 68ee098e61
commit baca42a2f8
+7 -2
View File
@@ -35,8 +35,13 @@ export class DragRulerRuler extends Ruler {
const json = super.toJSON(); const json = super.toJSON();
if (this.draggedEntity) { if (this.draggedEntity) {
const isToken = this.draggedEntity instanceof Token; const isToken = this.draggedEntity instanceof Token;
json["draggedEntityIsToken"] = isToken; json.draggedEntityIsToken = isToken;
json["draggedEntity"] = this.draggedEntity.id; json.draggedEntity = this.draggedEntity.id;
json.waypoints = json.waypoints.map(old => {
let w = duplicate(old);
w.isPathfinding = undefined;
return w;
});
} }
return json; return json;
} }