Compare commits

..

No commits in common. "da4e41870794dd03190dbad085bcd26a3b5a39cf" and "98e8ac05bba2d0c68d433d38eecc4961524a9435" have entirely different histories.

2 changed files with 17 additions and 22 deletions

View File

@ -29,7 +29,6 @@ module.exports = {
"semi": [
"error",
"always"
],
"no-mixed-spaces-and-tabs": "off"
]
}
};

View File

@ -31,9 +31,8 @@ app.get("/", (req, res) => {
io.on("connection", (socket) => {
// Handle disconnection
socket.on("disconnect", () => {
if (players[socket.id]) {
const room = players[socket.id].room;
delete players[socket.id];
var playerUpdate = {};
if (io.sockets.adapter.rooms[room]) {
@ -49,9 +48,6 @@ io.on("connection", (socket) => {
if (io.sockets.adapter.rooms[room] == undefined) {
console.log(traffic.int + colours.room(`Room ${room} has been deleted due to a lack of players`));
}
}
delete players[socket.id];
});
// Request identification