Broadcast pathfinding waypoints to other players
This commit is contained in:
+7
-2
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user