From 4b9caeddce1cef91ece68d14cfa849fbe3fcb02b Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Mon, 28 Feb 2011 03:00:54 +0200 Subject: [PATCH] 50/50 probability for either a predator or prey to play the taunt, fixing a conflict. I'm not sure if this is done in the best way, but well, it works :P --- data/qcsrc/server/vore.qc | 44 ++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index a637c150..29f8dbb3 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -414,28 +414,34 @@ void Vore_AutoTaunt() { // triggers ambient vore taunts, for both pred and prey - // predator taunts - if(self.stomach_load && !Stomach_TeamMates_check(self)) + // 50/50 probability for either a predator or prey to play the taunt + if(random() < 0.5) { - if(!self.taunt_soundtime) - SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPRED); - } - else if(self.taunt_soundtype == TAUNTTYPE_VOREPRED) - { - // we have a predator taunt scheduled, but are no longer a (suitable) predator, so remove it - SetAutoTaunt(self, 0, FALSE, 0); - } - - // prey taunts - if(self.predator.classname == "player" && !(teams_matter && self.team == self.predator.team)) - { - if(!self.taunt_soundtime) - SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPREY); + // predator taunts + if(self.stomach_load && !Stomach_TeamMates_check(self)) + { + if(!self.taunt_soundtime) + SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPRED); + } + else if(self.taunt_soundtype == TAUNTTYPE_VOREPRED) + { + // we have a predator taunt scheduled, but are no longer a (suitable) predator, so remove it + SetAutoTaunt(self, 0, FALSE, 0); + } } - else if(self.taunt_soundtype == TAUNTTYPE_VOREPREY) + else { - // we have a prey taunt scheduled, but are no longer a (suitable) prey, so remove it - SetAutoTaunt(self, 0, FALSE, 0); + // prey taunts + if(self.predator.classname == "player" && !(teams_matter && self.team == self.predator.team)) + { + if(!self.taunt_soundtime) + SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPREY); + } + else if(self.taunt_soundtype == TAUNTTYPE_VOREPREY) + { + // we have a prey taunt scheduled, but are no longer a (suitable) prey, so remove it + SetAutoTaunt(self, 0, FALSE, 0); + } } } -- 2.39.2