]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
50/50 probability for either a predator or prey to play the taunt, fixing a conflict...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 01:00:54 +0000 (03:00 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 01:00:54 +0000 (03:00 +0200)
data/qcsrc/server/vore.qc

index a637c15080d6f6025ed4ad11bc15798ed6de7d36..29f8dbb341c626cf28d2d41beb1ef70f6f5c2a59 100644 (file)
@@ -414,28 +414,34 @@ void Vore_AutoTaunt()
 {\r
        // triggers ambient vore taunts, for both pred and prey\r
 \r
-       // predator taunts\r
-       if(self.stomach_load && !Stomach_TeamMates_check(self))\r
+       // 50/50 probability for either a predator or prey to play the taunt\r
+       if(random() < 0.5)\r
        {\r
-               if(!self.taunt_soundtime)\r
-                       SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPRED);\r
-       }\r
-       else if(self.taunt_soundtype == TAUNTTYPE_VOREPRED)\r
-       {\r
-               // we have a predator taunt scheduled, but are no longer a (suitable) predator, so remove it\r
-               SetAutoTaunt(self, 0, FALSE, 0);\r
-       }\r
-\r
-       // prey taunts\r
-       if(self.predator.classname == "player" && !(teams_matter && self.team == self.predator.team))\r
-       {\r
-               if(!self.taunt_soundtime)\r
-                       SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPREY);\r
+               // predator taunts\r
+               if(self.stomach_load && !Stomach_TeamMates_check(self))\r
+               {\r
+                       if(!self.taunt_soundtime)\r
+                               SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPRED);\r
+               }\r
+               else if(self.taunt_soundtype == TAUNTTYPE_VOREPRED)\r
+               {\r
+                       // we have a predator taunt scheduled, but are no longer a (suitable) predator, so remove it\r
+                       SetAutoTaunt(self, 0, FALSE, 0);\r
+               }\r
        }\r
-       else if(self.taunt_soundtype == TAUNTTYPE_VOREPREY)\r
+       else\r
        {\r
-               // we have a prey taunt scheduled, but are no longer a (suitable) prey, so remove it\r
-               SetAutoTaunt(self, 0, FALSE, 0);\r
+               // prey taunts\r
+               if(self.predator.classname == "player" && !(teams_matter && self.team == self.predator.team))\r
+               {\r
+                       if(!self.taunt_soundtime)\r
+                               SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPREY);\r
+               }\r
+               else if(self.taunt_soundtype == TAUNTTYPE_VOREPREY)\r
+               {\r
+                       // we have a prey taunt scheduled, but are no longer a (suitable) prey, so remove it\r
+                       SetAutoTaunt(self, 0, FALSE, 0);\r
+               }\r
        }\r
 }\r
 \r