From: David NĂ©grier Date: Tue, 28 Apr 2020 20:31:54 +0000 (+0200) Subject: Merge X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7dc3d9d836a4dfeda5c6b9d917c66d3dcfc465e5;p=libreadventure.git Merge --- 7dc3d9d836a4dfeda5c6b9d917c66d3dcfc465e5 diff --cc back/src/Model/Websocket/MessageUserPosition.ts index 2e79f5e,117c99c..a3161b6 --- a/back/src/Model/Websocket/MessageUserPosition.ts +++ b/back/src/Model/Websocket/MessageUserPosition.ts @@@ -24,9 -27,10 +27,9 @@@ export class Point implements PointInte export class MessageUserPosition extends Message{ position: PointInterface; - constructor(message: string) { - super(message); - let data = JSON.parse(message); + constructor(data: any) { + super(data); - this.position = new Point(data.position.x, data.position.y); + this.position = new Point(data.position.x, data.position.y, data.position.direction); } toString() { @@@ -38,4 -42,4 +41,4 @@@ }) ); } --} ++}