From 23cd2056bf838a07bb67ffdb9eda5081c9ae9c47 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 3 Jan 2016 00:03:41 +0100 Subject: [PATCH] Ignore extra arguments in playSound and playSound3D. A common mistake in mods is to use playSound with volume/pitch arguments, which only playSoundVP supports. Previously these extra arguments raised a parser error, making the respective mod unusable. --- components/compiler/extensions0.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/compiler/extensions0.cpp b/components/compiler/extensions0.cpp index 8f7650191..8c76cdbb8 100644 --- a/components/compiler/extensions0.cpp +++ b/components/compiler/extensions0.cpp @@ -341,9 +341,9 @@ namespace Compiler extensions.registerInstruction ("say", "SS", opcodeSay, opcodeSayExplicit); extensions.registerFunction ("saydone", 'l', "", opcodeSayDone, opcodeSayDoneExplicit); extensions.registerInstruction ("streammusic", "S", opcodeStreamMusic); - extensions.registerInstruction ("playsound", "c", opcodePlaySound); + extensions.registerInstruction ("playsound", "cXX", opcodePlaySound); extensions.registerInstruction ("playsoundvp", "cff", opcodePlaySoundVP); - extensions.registerInstruction ("playsound3d", "c", opcodePlaySound3D, + extensions.registerInstruction ("playsound3d", "cXX", opcodePlaySound3D, opcodePlaySound3DExplicit); extensions.registerInstruction ("playsound3dvp", "cff", opcodePlaySound3DVP, opcodePlaySound3DVPExplicit);