From: MirceaKitsune Date: Mon, 28 Feb 2011 01:00:54 +0000 (+0200) Subject: 50/50 probability for either a predator or prey to play the taunt, fixing a conflict... X-Git-Url: https://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=4b9caeddce1cef91ece68d14cfa849fbe3fcb02b;ds=sidebyside 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 --- 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); + } } }