This issue was discovered during a fix for the disconnect.
Some information regarding the issue is stated below. Also the images were taken after both players joined the room.
This player is the first person to join the room(Image below):
Notice how the chat shows that the 2nd player has joined the room...
This player is the second player to join the room(Image Below):
The second player works fine but cannot see the third player.
This is the third player to join the room:
And so on....
The related code snippet regarding this issue is:
// Does not exist - need to create new player
else if (isSetup && (players[socket.id] === undefined || players[socket.id] === null)){
console.log("Create a player");
players[player] = createPlayer(pl);
}
The snippet is located in app.js from lines 175 to 180.
Both statements in this OR statement return false (players[socket.id] === undefined || players[socket.id] === null) for the player who joined before.
From @DarkFlamex1 on July 2, 2018 19:9
This issue was discovered during a fix for the disconnect.
Some information regarding the issue is stated below. Also the images were taken after both players joined the room.
This player is the first person to join the room(Image below): Notice how the chat shows that the 2nd player has joined the room...
This player is the second player to join the room(Image Below):
The second player works fine but cannot see the third player.
This is the third player to join the room:
And so on....
The related code snippet regarding this issue is:
The snippet is located in app.js from lines 175 to 180.
Both statements in this OR statement return false
(players[socket.id] === undefined || players[socket.id] === null)
for the player who joined before.Copied from original issue: dbqeo/AtomBlast.io#4