From 4ea19f1fa4267f4c3831b17016f3da0b7c9c14eb Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Mon, 10 Apr 2023 20:58:12 +0200 Subject: more robust args --- webAO/packets/handlers/handleMS.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'webAO/packets/handlers/handleMS.ts') 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("|"), -- cgit