}\r
}\r
\r
-.float gurglesound_finished;\r
+.float gurglesound_finished, gurglesound_oldstomachload;\r
void Vore_Gurglesound()\r
{\r
- if(time > self.gurglesound_finished)\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
- sound (self, CHAN_WEAPON2, "weapons/stomachkick.ogg", vol, ATTN_NORM);\r
- self.gurglesound_finished = time + 1;\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
+\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
}\r
}\r
\r
void Vore()\r
-{Vore_Gurglesound();\r
+{\r
// skip the vore system under some circumstances\r
if(time < game_starttime)\r
{\r
}\r
}\r
\r
+ Vore_Gurglesound();\r
+\r
// --------------------------------\r
// Code that addresses the prey:\r
// --------------------------------\r