Make gurgle sound per-player
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 2 Sep 2010 18:27:12 +0000 (21:27 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 2 Sep 2010 18:27:12 +0000 (21:27 +0300)
data/models/player/vixen.zym.sounds
data/qcsrc/server/cl_player.qc
data/qcsrc/server/defs.qh
data/qcsrc/server/vore.qc
data/sound/player/gurgle.ogg [deleted file]
data/sound/player/pyria-skadi/player/gurgle.ogg [new file with mode: 0644]

index 457e898..20cd0a5 100644 (file)
@@ -29,6 +29,7 @@ jump sound/player/pyria-skadi/player/jump 0
 swallow sound/player/pyria-skadi/player/swallow 0
 regurgitate sound/player/pyria-skadi/player/regurgitate 0
 regurgitate_prepare sound/player/pyria-skadi/player/regurgitate_prepare 0
+gurgle sound/player/pyria-skadi/player/gurgle 0
 pain25 sound/player/pyria-skadi/player/pain25 0
 pain50 sound/player/pyria-skadi/player/pain50 0
 pain75 sound/player/pyria-skadi/player/pain75 0
index eeb1795..8802045 100644 (file)
@@ -1292,6 +1292,12 @@ void GlobalSound(string sample, float chan, float voicetype)
                case VOICETYPE_PLAYERSOUND:\r
                        sound(self, chan, sample, VOL_BASE, ATTN_NORM);\r
                        break;\r
+               case VOICETYPE_GURGLE:\r
+                       if(self.stomach_load)\r
+                               sound(self, chan, sample, VOL_BASE * self.stomach_load / cvar("g_balance_vore_swallow_limit"), ATTN_NORM);\r
+                       else\r
+                               stopsound(self, chan);\r
+                       break;\r
                default:\r
                        backtrace("Invalid voice type!");\r
                        break;\r
index 91fc21e..8af7677 100644 (file)
@@ -447,6 +447,7 @@ float next_pingtime;
                _VOICEMSG(swallow) \\r
                _VOICEMSG(regurgitate) \\r
                _VOICEMSG(regurgitate_prepare) \\r
+               _VOICEMSG(gurgle) \\r
                _VOICEMSG(jump) \\r
                _VOICEMSG(pain25) \\r
                _VOICEMSG(pain50) \\r
@@ -495,6 +496,7 @@ string globalsound_metalstep;
 #define VOICETYPE_LASTATTACKER_ONLY 13\r
 #define VOICETYPE_AUTOTAUNT 14\r
 #define VOICETYPE_TAUNT 15\r
+#define VOICETYPE_GURGLE 16\r
 \r
 void PrecachePlayerSounds(string f);\r
 void PrecacheGlobalSound(string samplestring);\r
index b43a4db..d2e51ce 100644 (file)
@@ -219,14 +219,7 @@ void Vore_Gurglesound()
 {\r
        if(time > self.gurglesound_finished || self.gurglesound_oldstomachload != self.stomach_load)\r
        {\r
-               local float vol;\r
-               vol = VOL_BASE * self.stomach_load / cvar("g_balance_vore_swallow_limit");\r
-\r
-               precache_sound("player/gurgle.ogg");\r
-               if(self.stomach_load)\r
-                       sound (self, CHAN_TRIGGER, "player/gurgle.ogg", vol, ATTN_NORM);\r
-               else\r
-                       stopsound(self, CHAN_TRIGGER);\r
+               GlobalSound(self.playersound_gurgle, CHAN_TRIGGER, VOICETYPE_GURGLE);\r
 \r
                self.gurglesound_finished = time + 11; // yes, hard coded sound length. I know it's bad but what can I do?\r
                self.gurglesound_oldstomachload = self.stomach_load;\r
diff --git a/data/sound/player/gurgle.ogg b/data/sound/player/gurgle.ogg
deleted file mode 100644 (file)
index e1ee710..0000000
Binary files a/data/sound/player/gurgle.ogg and /dev/null differ
diff --git a/data/sound/player/pyria-skadi/player/gurgle.ogg b/data/sound/player/pyria-skadi/player/gurgle.ogg
new file mode 100644 (file)
index 0000000..e1ee710
Binary files /dev/null and b/data/sound/player/pyria-skadi/player/gurgle.ogg differ