mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-29 11:26:13 +08:00
graying people out when they left in private matches
This commit is contained in:
parent
c9ea7f10bd
commit
a732996c72
1 changed files with 5 additions and 11 deletions
|
|
@ -1204,17 +1204,11 @@ socket.on("mp_room_user_left", (data) => {
|
|||
resetReadyButtons();
|
||||
} else {
|
||||
delete room.users[data.sid];
|
||||
if (state <= 8) {
|
||||
Matchmaking.setBannerText(
|
||||
`Waiting for more players to join (${
|
||||
Object.keys(room.users).length
|
||||
}/2)...`
|
||||
);
|
||||
} else if (state >= 20 && state < 29) {
|
||||
$(`.tribePlayers .player[sid=${data.sid}]`).addClass("failed");
|
||||
$(`.tribeResult .player[sid=${data.sid}]`).addClass("failed");
|
||||
$(`.tribeResult table .player[sid=${data.sid}] .other`).text("left");
|
||||
}
|
||||
}
|
||||
if (state >= 20 && state < 29) {
|
||||
$(`.tribePlayers .player[sid=${data.sid}]`).addClass("failed");
|
||||
$(`.tribeResult .player[sid=${data.sid}]`).addClass("failed");
|
||||
$(`.tribeResult table .player[sid=${data.sid}] .other`).text("left");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue