diff options
| author | stonedDiscord <stoned@derpymail.org> | 2019-07-17 00:41:05 +0200 |
|---|---|---|
| committer | stonedDiscord <stoned@derpymail.org> | 2019-07-17 00:41:05 +0200 |
| commit | 3d53f17fa74e49c19716be9ffc7585fa86d1aa90 (patch) | |
| tree | 0246136321e28342afc38a71cea3cea0cd37b1ad /webAO/client.js | |
| parent | 0724018f16ff439ffc6218dfbd35d082117ffd52 (diff) | |
why not trust the servers charid. this fixed the reset and removes a loop
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/webAO/client.js b/webAO/client.js index 2a8bb94..8a5ddfb 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -473,7 +473,7 @@ class Client extends EventEmitter { side: args[6], sound: escape(args[7]), type: args[8], - // charid: args[9], + charid: args[9], snddelay: args[10], objection: args[11], evidence: args[12], @@ -482,16 +482,8 @@ class Client extends EventEmitter { color: args[15], isnew: true, }; - - // The dreaded linear search... - for (let i = 0; i < this.chars.length; i++) { - if (this.chars[i].name === args[3]) { - chatmsg.character = i; - break; - } - } - - if (chatmsg.character === this.charID) { + + if (chatmsg.charid === this.charID) { resetICParams(); } |
