From 917d51d69751aad15401a8a33f59b6ce3d33d931 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Thu, 9 Apr 2026 21:37:43 +0200 Subject: fix layton sfx --- webAO/packets/handlers/handlePV.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webAO/packets/handlers/handlePV.ts b/webAO/packets/handlers/handlePV.ts index 90e47f1..0865fe8 100644 --- a/webAO/packets/handlers/handlePV.ts +++ b/webAO/packets/handlers/handlePV.ts @@ -60,10 +60,10 @@ export const handlePV = async (args: string[]) => { let esfx; let esfxd; try { - esfx = ini.soundn[i] || "0"; - esfxd = Number(ini.soundt[i]) || 0; + esfx = ini.soundn?.[i] || "0"; + esfxd = ini.soundt?.[i] ? Number(ini.soundt[i]) : 0; } catch (e) { - console.warn("ini sound is completly missing"); + console.warn(`ini sound is completly missing: ${e}`); esfx = "0"; esfxd = 0; } -- cgit