summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-11-16 01:29:36 +0100
committerTor Andersson <tor@ccxvii.net>2021-11-16 01:29:36 +0100
commit0030c0313852fbbc73ec0332a9b7d48b7b9ada52 (patch)
tree2cbb1ccd04b3c2ec1e2c7e708e4b820e781d63ca /server.js
parent6ba80db16551bbafa11385d7f98393731357ab93 (diff)
downloadserver-0030c0313852fbbc73ec0332a9b7d48b7b9ada52.tar.gz
Don't accidentally clear the ROLES list when starting a random game.
Diffstat (limited to 'server.js')
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
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);