Getting rid of roomId in Message class (this is not needed since all messages sent are for the room we are currently in)

This commit is contained in:
David Négrier 2020-05-16 00:19:27 +02:00
parent 4d1c3517ec
commit 3b6ace03fa
5 changed files with 13 additions and 35 deletions

View file

@ -361,12 +361,12 @@ export class IoSocketController {
character: Client.character,
};
let messageUserPosition = new MessageUserPosition(data);
let world = this.Worlds.get(messageUserPosition.roomId);
let world = this.Worlds.get(Client.roomId);
if (!world) {
return;
}
world.updatePosition(Client, messageUserPosition.position);
this.Worlds.set(messageUserPosition.roomId, world);
this.Worlds.set(Client.roomId, world);
}
//Hydrate and manage error