diff options
| author | stonedDiscord <Tukz@gmx.de> | 2023-04-10 20:58:12 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2023-04-10 20:58:12 +0200 |
| commit | 4ea19f1fa4267f4c3831b17016f3da0b7c9c14eb (patch) | |
| tree | 1e61874aecf4b9fc5c2602adcda2c95c0df81f26 /webAO/packets | |
| parent | 73a2fc31ecfcb54d97e74474696f28f39b6b6308 (diff) | |
more robust args
Diffstat (limited to 'webAO/packets')
| -rw-r--r-- | webAO/packets/handlers/handleMS.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webAO/packets/handlers/handleMS.ts b/webAO/packets/handlers/handleMS.ts index c30e777..3be4eef 100644 --- a/webAO/packets/handlers/handleMS.ts +++ b/webAO/packets/handlers/handleMS.ts @@ -76,7 +76,7 @@ export const handleMS = (args: string[]) => { speed: UPDATE_INTERVAL, }; - if (extrafeatures.includes("cccc_ic_support")) { + if (args.length>16) { const extra_cccc = { showname: prepChat(args[16]), other_charid: Number(args[17]), @@ -89,7 +89,7 @@ export const handleMS = (args: string[]) => { }; chatmsg = Object.assign(extra_cccc, chatmsg); - if (extrafeatures.includes("looping_sfx")) { + if (args.length>24) { const extra_27 = { looping_sfx: Number(args[24]), screenshake: Number(args[25]), @@ -99,7 +99,7 @@ export const handleMS = (args: string[]) => { }; chatmsg = Object.assign(extra_27, chatmsg); - if (extrafeatures.includes("effects")) { + if (args.length>29) { const extra_28 = { additive: Number(args[29]), effects: args[30].split("|"), |
