Fix error mapping refresh in back & the end of this feature development
This commit is contained in:
parent
8b9c36e3be
commit
f4af824cf9
21 changed files with 17 additions and 1840 deletions
|
@ -40,12 +40,16 @@ let RefreshUserPositionFunction = function(rooms : ExtRooms, Io: socketIO.Server
|
|||
mapPositionUserByRoom.set(data.roomId, dataArray);
|
||||
|
||||
// update position in the worl
|
||||
if (!Worlds) {
|
||||
return;
|
||||
}
|
||||
let messageUserPosition = new MessageUserPosition(data);
|
||||
let world = Worlds.get(messageUserPosition.roomId);
|
||||
if(world) {
|
||||
world.updatePosition(messageUserPosition);
|
||||
Worlds.set(messageUserPosition.roomId, world);
|
||||
if (!world) {
|
||||
return;
|
||||
}
|
||||
world.updatePosition(messageUserPosition);
|
||||
Worlds.set(messageUserPosition.roomId, world);
|
||||
}
|
||||
rooms.userPositionMapByRoom = Array.from(mapPositionUserByRoom);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue