]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Allow setting the volume of a global sound
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 3 Mar 2012 13:32:38 +0000 (15:32 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 3 Mar 2012 13:32:38 +0000 (15:32 +0200)
data/qcsrc/server/cl_physics.qc
data/qcsrc/server/cl_player.qc
data/qcsrc/server/defs.qh
data/qcsrc/server/sv_main.qc
data/qcsrc/server/vore.qc

index e595c69abec6f924c39d6dedb37d66256c342f0a..69bd25db64f8fd1c7f9c9d87e1a2042dab81bb23 100644 (file)
@@ -868,12 +868,12 @@ void SV_PlayerPhysics()
                        {\r
                                if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)\r
                                {\r
-                                       GlobalSound(globalsound_metalfall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);\r
+                                       GlobalSound(globalsound_metalfall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE);\r
                                        pointparticles(particleeffectnum("ground_metal"), self.origin, '0 0 0', 1);\r
                                }\r
                                else\r
                                {\r
-                                       GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);\r
+                                       GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE);\r
                                        pointparticles(particleeffectnum("ground_dirt"), self.origin, '0 0 0', 1);\r
                                }\r
                        }\r
index f7cae1c63e91919213bee6e60199d791b5d11158..7f22f580ae3aaa658407344b79db71994deaaf36 100644 (file)
@@ -1221,7 +1221,7 @@ void UpdatePlayerSounds()
        LoadPlayerSounds(strcat(self.model, ".sounds"), 0);\r
 }\r
 \r
-void GlobalSound(string sample, float chan, float voicetype)\r
+void GlobalSound(string sample, float chan, float voicetype, float vol)\r
 {\r
        float n;\r
        float tauntrand;\r
@@ -1368,7 +1368,7 @@ void PlayerSound(entity player, .string samplefield, float chan, float voicetype
        oldself = self;\r
        self = player;\r
        sample = self.samplefield;\r
-       GlobalSound(sample, chan, voicetype);\r
+       GlobalSound(sample, chan, voicetype, VOL_BASEVOICE);\r
        self = oldself;\r
 }\r
 \r
index 55cdcae9bd9df70ff60d73a524d53176e6d18457..6871a58495c6b48a7716b90617d382ae61b4139b 100644 (file)
@@ -518,7 +518,7 @@ void PrecacheGlobalSound(string samplestring);
 void UpdatePlayerSounds();\r
 void ClearPlayerSounds();\r
 void PlayerSound(entity player, .string samplefield, float channel, float voicetype);\r
-void GlobalSound(string samplestring, float channel, float voicetype);\r
+void GlobalSound(string samplestring, float channel, float voicetype, float vol);\r
 void VoiceMessage(string type, string message);\r
 \r
 // autotaunt system\r
index 52aca6a192491d50325ae110640aa1b48904e04f..310fd44693522303010589d3da90275f31a27b48 100644 (file)
@@ -107,9 +107,9 @@ void CreatureFrame (void)
                                        if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)\r
                                        {\r
                                                if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)\r
-                                                       GlobalSound(globalsound_metalstep, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);\r
+                                                       GlobalSound(globalsound_metalstep, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE);\r
                                                else\r
-                                                       GlobalSound(globalsound_step, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);\r
+                                                       GlobalSound(globalsound_step, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE);\r
 \r
                                                sound(self, CHAN_AUTO, "misc/macro_footstep.wav", VOL_BASE, ATTN_NORM);\r
                                        }\r
index 87baed61be5e6ff458900ddd304e09c48648f612..5dca344b35b7b8646a75e3dd2f865f91328733e9 100644 (file)
@@ -139,7 +139,7 @@ void Vore_GurgleSound()
 {\r
        if(time > self.gurglesound_finished || (self.gurgle_oldstomachload != self.stomach_load && !self.digesting))\r
        {\r
-               GlobalSound(self.playersound_gurgle, CHAN_TRIGGER, VOICETYPE_GURGLE);\r
+               GlobalSound(self.playersound_gurgle, CHAN_TRIGGER, VOICETYPE_GURGLE, VOL_BASE);\r
 \r
                self.gurglesound_finished = time + 11; // yes, hard coded sound length. I know it's bad but what can I do?\r
                self.gurgle_oldstomachload = self.stomach_load;\r