From: MirceaKitsune Date: Sat, 19 Nov 2011 14:47:21 +0000 (+0200) Subject: Fix some older bugs with the digestion sounds X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c2fcc7cd808c5a09d62294c285f24a3ae49aaec1;p=voretournament%2Fvoretournament.git Fix some older bugs with the digestion sounds --- diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index e07db746..d7f55b96 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -137,7 +137,7 @@ void Vore_SetPreyPositions(entity pred) .float gurgle_oldstomachload; void Vore_GurgleSound() { - if(time > self.gurglesound_finished || self.gurgle_oldstomachload != self.stomach_load) + if(time > self.gurglesound_finished || (self.gurgle_oldstomachload != self.stomach_load && !self.digesting)) { GlobalSound(self.playersound_gurgle, CHAN_TRIGGER, VOICETYPE_GURGLE); @@ -429,9 +429,9 @@ void Vore_Disconnect() if(head.predator == self) Vore_Regurgitate(head); } - Vore_GurgleSound(); // stop the gurgling sound self.stomach_load = self.gravity = 0; // prevents a bug + Vore_GurgleSound(); // stop the gurgling sound } .float digestion_step; @@ -467,11 +467,6 @@ void Vore_Digest() if(cvar("g_balance_vore_digestion_vampire") && self.predator.health < cvar("g_balance_vore_digestion_vampire_stable")) self.predator.health += damage * cvar("g_balance_vore_digestion_vampire"); - if (self.predator.digestsound_finished < time) - { - PlayerSound (self.predator, playersound_digest, CHAN_PLAYER, VOICETYPE_PLAYERSOUND); - self.predator.digestsound_finished = time + 0.5; - } self.digestion_step = time + vore_steptime; } @@ -813,6 +808,11 @@ void Vore() return; } + if (self.digesting && self.digestsound_finished < time) + { + PlayerSound (self, playersound_digest, CHAN_PLAYER, VOICETYPE_PLAYERSOUND); + self.digestsound_finished = time + 0.5; + } if(cvar("g_vore_gurglesound")) Vore_GurgleSound();