From 2c7e1e4407fe641c7e0546ee7cbe8c1a22f31b97 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 28 Feb 2013 09:46:44 +0000 Subject: [PATCH] restore flags feature in csqc sound7 builtin, so that mods can use CHANNELFLAG_FORCELOOP and others as before git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11918 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=b3a534588ed7c76a3ed7dde8140c083af642f4dc --- clvm_cmds.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/clvm_cmds.c b/clvm_cmds.c index 67a496b9..e1c6ff0d 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -175,9 +175,7 @@ static void VM_CL_sound (prvm_prog_t *prog) float attenuation; float pitchchange; float startposition; - /* int flags; - */ vec3_t org; VM_SAFEPARMCOUNTRANGE(5, 7, VM_CL_sound); @@ -204,14 +202,11 @@ static void VM_CL_sound (prvm_prog_t *prog) pitchchange = 0; else pitchchange = PRVM_G_FLOAT(OFS_PARM5); - // ignoring prog->argc < 7 for now (no flags supported yet) - /* if (prog->argc < 7) flags = 0; else flags = PRVM_G_FLOAT(OFS_PARM6); - */ // sound_starttime exists instead of sound_startposition because in a // networking sense you might not know when something is being received, @@ -235,7 +230,7 @@ static void VM_CL_sound (prvm_prog_t *prog) // We want to, in a later extension, expose more flags. CL_VM_GetEntitySoundOrigin(MAX_EDICTS + PRVM_NUM_FOR_EDICT(entity), org); - S_StartSound_StartPosition_Flags(MAX_EDICTS + PRVM_NUM_FOR_EDICT(entity), channel, S_FindName(sample), org, volume, attenuation, startposition, 0, pitchchange > 0.0f ? pitchchange * 0.01f : 1.0f); + S_StartSound_StartPosition_Flags(MAX_EDICTS + PRVM_NUM_FOR_EDICT(entity), channel, S_FindName(sample), org, volume, attenuation, startposition, flags, pitchchange > 0.0f ? pitchchange * 0.01f : 1.0f); } // #483 void(vector origin, string sample, float volume, float attenuation) pointsound -- 2.39.2