diff options
| author | sD <stoned@derpymail.org> | 2020-01-11 16:07:19 +0100 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2020-01-11 16:07:19 +0100 |
| commit | a937f9bde1ae9f45857550c6067616182f2745a6 (patch) | |
| tree | 1bab9a6592ffcea466dc02e7e6fa6eca622c37a4 | |
| parent | 245f93bd09f4a7c49c0d5110565729c893ea74e6 (diff) | |
make music charid a number
| -rw-r--r-- | webAO/client.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/webAO/client.js b/webAO/client.js index fa1df5d..6f11881 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -552,12 +552,13 @@ class Client extends EventEmitter { * @param {Array} args packet arguments */ handleMC(args) { - const [_packet, track, charID] = args; + const track = args[1]; + const charID = Number(args[2]); const music = viewport.music; music.pause(); music.src = MUSIC_HOST + track.toLowerCase(); music.play(); - if (Number(args[2]) >= 0) { + if (charID >= 0) { const musicname = this.chars[charID].name; appendICLog(`${musicname} changed music to ${track}`); } else { |
