diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-11-16 01:29:36 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-11-16 01:29:36 +0100 |
commit | 0030c0313852fbbc73ec0332a9b7d48b7b9ada52 (patch) | |
tree | 2cbb1ccd04b3c2ec1e2c7e708e4b820e781d63ca /server.js | |
parent | 6ba80db16551bbafa11385d7f98393731357ab93 (diff) | |
download | server-0030c0313852fbbc73ec0332a9b7d48b7b9ada52.tar.gz |
Don't accidentally clear the ROLES list when starting a random game.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |