From: havoc Date: Wed, 16 May 2007 13:45:39 +0000 (+0000) Subject: changed an error when fighting the end boss of Nehahra to merely a X-Git-Tag: xonotic-v0.1.0preview~3163 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b40dc27b7789367880989759ca3d4c88cc26ce25;p=xonotic%2Fdarkplaces.git changed an error when fighting the end boss of Nehahra to merely a warning, the qc should be fixed though git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7290 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/svvm_cmds.c b/svvm_cmds.c index 2b936116..23a7524e 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -435,13 +435,18 @@ static void VM_SV_sound (void) int volume; float attenuation; - VM_SAFEPARMCOUNT(5, VM_SV_sound); + VM_SAFEPARMCOUNTRANGE(4, 5, VM_SV_sound); entity = PRVM_G_EDICT(OFS_PARM0); channel = (int)PRVM_G_FLOAT(OFS_PARM1); sample = PRVM_G_STRING(OFS_PARM2); volume = (int)(PRVM_G_FLOAT(OFS_PARM3) * 255); attenuation = PRVM_G_FLOAT(OFS_PARM4); + if (prog->argc < 5) + { + Con_DPrintf("VM_SV_sound: given only 4 parameters, expected 5, assuming attenuation = ATTN_NORMAL\n"); + attenuation = 1; + } if (volume < 0 || volume > 255) {