]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
rename CHANFLAG_RELIABLE to SOUNDFLAG_RELIABLE to match dpdefs; remove accidental...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2013 11:38:50 +0000 (11:38 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2013 11:38:50 +0000 (11:38 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11909 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c
sound.h
svvm_cmds.c

index ce253af6852530d0ea50b96248585e60abd80af1..f7de708f53b735f68354448446e5913f017f5be2 100644 (file)
@@ -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 0162c37c72923a83a3494774e7fae5d55b6f54b6..28b0f0a01fcfc3aaae455a3dad1959e28b995aa9 100644 (file)
--- 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
index de270a2aae2ba329d2d95834c4464d0f7644875b..053ae44aefbb2f23e50af87d9bf580f2ed037a21 100644 (file)
@@ -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);
 }
 
 /*