From ebaf1acacca94cf07254dd790f39da05d57f1162 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 27 Feb 2013 11:38:50 +0000 Subject: [PATCH] rename CHANFLAG_RELIABLE to SOUNDFLAG_RELIABLE to match dpdefs; remove accidental flags passing in CL_sound() git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11909 d7cf8633-e32d-0410-b094-e92efae38249 --- clvm_cmds.c | 6 +++++- sound.h | 2 +- svvm_cmds.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/clvm_cmds.c b/clvm_cmds.c index ce253af6..f7de708f 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -216,8 +216,12 @@ static void VM_CL_sound (prvm_prog_t *prog) return; } + // TODO currently the only flag defined in the interface is + // SOUNDFLAG_RELIABLE. This one makes no sense at all from CSQC. + // 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, 0, flags, 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, 0, 0, pitchchange > 0.0f ? pitchchange * 0.01f : 1.0f); } // #483 void(vector origin, string sample, float volume, float attenuation) pointsound diff --git a/sound.h b/sound.h index 0162c37c..28b0f0a0 100644 --- a/sound.h +++ b/sound.h @@ -75,7 +75,7 @@ qboolean S_IsSoundPrecached (const sfx_t *sfx); sfx_t *S_FindName(const char *name); // for sound() builtins -#define CHANFLAG_RELIABLE 1 +#define SOUNDFLAG_RELIABLE 1 // these define the "engine" channel namespace #define CHAN_MIN_AUTO -128 diff --git a/svvm_cmds.c b/svvm_cmds.c index de270a2a..053ae44a 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -549,7 +549,7 @@ static void VM_SV_sound(prvm_prog_t *prog) flags = 0; if(channel >= 8 && channel <= 15) // weird QW feature { - flags |= CHANFLAG_RELIABLE; + flags |= SOUNDFLAG_RELIABLE; channel -= 8; } } @@ -576,7 +576,7 @@ static void VM_SV_sound(prvm_prog_t *prog) return; } - SV_StartSound (entity, channel, sample, volume, attenuation, flags & CHANFLAG_RELIABLE, pitchchange); + SV_StartSound (entity, channel, sample, volume, attenuation, flags & SOUNDFLAG_RELIABLE, pitchchange); } /* -- 2.39.2