From: MirceaKitsune Date: Mon, 6 Sep 2010 18:30:26 +0000 (+0300) Subject: Add cvar (acting as probability factor) X-Git-Url: https://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=cc23a7f7de9e6e058039ed39b4bffd44fffa3238;hp=d433e67740b2b1d6796dd235bca965b25c1b238f Add cvar (acting as probability factor) --- diff --git a/data/defaultVoretournament.cfg b/data/defaultVoretournament.cfg index 7f7ff3ee..a9b50b0c 100644 --- a/data/defaultVoretournament.cfg +++ b/data/defaultVoretournament.cfg @@ -1498,6 +1498,7 @@ set g_vore_regurgitatecolor_released "0.75 1 0.5" "the color players will have w set g_vore_regurgitatecolor_digested "-0.125 0.25 0" "the color players will have when released from the stomach digested" set g_vore_gurglesound 1 "predators make an ambient gurgling sound" set g_vore_biggergut 1 "when enabled, a player can't swallow someone with more players in their stomach than them" +set g_vore_stealprey 0.5 "probability of stealing the prey from someone you are eating (if true their prey joins your stomach with them). 0 = never and 1 = always" set g_vore_dropweapon 0.75 "probability of dropping your weapon when being swallowed. 0 = never and 1 = always, does not apply to team mates" set g_vore_showpreyhealth 1 "when enabled, a predator can see their prey's health on the stomach board" set g_vore_soundocclusion 0.25 "directional player sounds are played at this amount of their normal volume for eaten players (simulates hearing harder from the stomach)" diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index b1b13558..1296b015 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -362,7 +362,7 @@ void Vore() targeteater = self.eater.eater; Vore_Regurgitate(self); - if(1 == 1) //cvar!!!!!!!!!!!!!!!! + if(random() < cvar("g_vore_stealprey")) if(Swallow_condition_check(self)) { oldself = self;