From: MirceaKitsune Date: Tue, 3 May 2011 17:21:13 +0000 (+0300) Subject: Change th swallow_delay cvar to also affect regurgitating. The system is now called... X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=d542937738d8cf6e06c891b89b054de8cbf482bb Change th swallow_delay cvar to also affect regurgitating. The system is now called action_delay. Whenever you both swallow or regurgitate someone, the delay is applied and blocks both actions. --- diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index 25d493e6..2b0142a4 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -187,7 +187,6 @@ set g_balance_grabber_reload_time 2 // {{{ stomach set g_balance_vore_swallow_range 100 "distance below which you can swallow another player when facing them" set g_balance_vore_swallow_limit 3 "how many players can fit inside a stomach (should not be greater than 3 due to the number of stomach state models for players)" -set g_balance_vore_swallow_delay 0.8 "how many seconds must pass before you can swallow again, after swallowing or regurgitating another player" set g_balance_vore_swallow_stealprey 0.7 "probability of stealing someone's prey when eating them (when true their prey joins your stomach rather than popping out). 0 = never, 1 = always" set g_balance_vore_swallow_dropweapon 0.6 "probability of dropping your weapon when swallowed. 0 = never and 1 = always, does not apply to team mates" set g_balance_vore_swallow_punchangle 12 "your view gets tilted by this amount when swallowing someone" @@ -196,6 +195,7 @@ set g_balance_vore_regurgitate_force 600 "regurgitated players rocket out at thi set g_balance_vore_regurgitate_predatorforce 450 "players are pushed back by this amount when regurgitating someone, opposite of the direction they are facing" set g_balance_vore_regurgitate_delay 0.135 "regurgitation delay" set g_balance_vore_regurgitate_punchangle 12 "your view gets tilted by this amount when regurgitating someone" +set g_balance_vore_action_delay 0.8 "how many seconds must pass before you can swallow or regurgitate again, after swallowing or regurgitating another player" set g_balance_vore_digestion_damage 5 "amount of damage applied to victims during digestion" set g_balance_vore_digestion_vampire 1 "amount of health you gain from digestion" set g_balance_vore_digestion_vampire_stable 150 "maximum amount of health you can gain from digestion (best kept equal or less than g_balance_health_rotstable)" diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 4dfe4a3f..7dd80176 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -1,5 +1,5 @@ .float regurgitate_prepare; -.float stomachkick_delay, system_delay, swallow_delay, digest_button_delay_time, regurgitate_button_delay_time; +.float stomachkick_delay, system_delay, action_delay, digest_button_delay_time, regurgitate_button_delay_time; .float complain_vore; .float vore_oldmovetype, vore_oldsolid, vore_oldstomachload; @@ -35,7 +35,7 @@ float Swallow_condition_check(entity prey) if(prey != self) if(prey.classname == "player" && !prey.stat_eaten && prey.deadflag == DEAD_NO) // we can't swallow someone who's already in someone else's stomach if(self.classname == "player" && !self.stat_eaten && self.deadflag == DEAD_NO) // we can't swallow players while inside someone's stomach ourselves - if(!self.BUTTON_REGURGITATE && self.swallow_delay < time) + if(!self.BUTTON_REGURGITATE && self.action_delay < time) if not(vlen(self.velocity) > cvar("g_balance_vore_regurgitate_speedcap")) { string swallow_complain; @@ -194,7 +194,7 @@ void Vore_Swallow(entity e) // block firing for a small amount of time, or we'll be firing the next frame after we swallow e.predator.weapon_delay = time + button_delay_time; - e.predator.swallow_delay = time + cvar("g_balance_vore_swallow_delay"); + e.predator.action_delay = time + cvar("g_balance_vore_action_delay"); e.system_delay = e.predator.system_delay = time + system_delay_time; e.stomachkick_delay = time + cvar("g_balance_vore_kick_delay"); // don't kick immediately after being swallowed } @@ -229,7 +229,7 @@ void Vore_Regurgitate(entity e) e.predator.punchangle_x += cvar("g_balance_vore_regurgitate_punchangle"); e.predator.stomach_load -= 1; e.predator.regurgitate_prepare = 0; - e.predator.swallow_delay = time + cvar("g_balance_vore_swallow_delay"); + e.predator.action_delay = time + cvar("g_balance_vore_action_delay"); Vore_WeightApply(e.predator); // block firing for a small amount of time, or we'll be firing the next frame @@ -434,12 +434,10 @@ void Vore_AutoTaunt() void Vore_SetSbarRings() { - float min_time; - if(self.swallow_delay > time) + if(self.action_delay > time) { - self.stat_sbring1_type = 1; // ring shows vore system delay - min_time = self.swallow_delay - cvar("g_balance_vore_swallow_delay"); - self.stat_sbring1_clip = bound(0, (time / self.swallow_delay - 1) / (min_time / self.swallow_delay - 1), 1); + self.stat_sbring1_type = 1; // ring shows vore action delay + self.stat_sbring1_clip = bound(0, (time / self.action_delay - 1) / ((self.action_delay - cvar("g_balance_vore_action_delay")) / self.action_delay - 1), 1); } else { @@ -624,6 +622,7 @@ void Vore() // apply delayed regurgitating if it was scheduled if(self.predator.regurgitate_prepare && time > self.predator.regurgitate_prepare) + if(time > self.predator.action_delay) { self.predator.regurgitate_prepare = 0; self.predator.complain_vore = time + complain_delay_time; // prevent complaining the next frame if this empties our stomach