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:
parent
4d1c3517ec
commit
3b6ace03fa
5 changed files with 13 additions and 35 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue