From 0030c0313852fbbc73ec0332a9b7d48b7b9ada52 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 16 Nov 2021 01:29:36 +0100 Subject: Don't accidentally clear the ROLES list when starting a random game. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index db1e098..f7f0286 100644 --- a/server.js +++ b/server.js @@ -1269,7 +1269,7 @@ function assign_random_roles(game, players) { list.splice(k, 1); return r; } - let roles = ROLES[game.title_id]; + let roles = ROLES[game.title_id].slice(); for (let p of players) { let old_role = p.role; p.role = pick_random_item(roles); -- cgit v1.2.3