From bc3e4294ed33bfc89b9b50ccd93d54c0fb64dee2 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 9 Jul 2011 17:03:59 +0300 Subject: [PATCH] Make the swallow progress idly decrease --- data/balanceVT.cfg | 2 ++ data/qcsrc/server/vore.qc | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index 15e91bd4..519a65b3 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -187,6 +187,8 @@ 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 in the stomach at a time, may range between 1 and 9" +set g_balance_vore_swallow_speed_fill 2 "how long it takes to swallow a player, 0 is instant" +set g_balance_vore_swallow_speed_decrease 0.5 "how fast the swallow progress decreases, when the predator is no longer swallowing" set g_balance_vore_swallow_speed 1 "how long it takes to swallow a 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" diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index dba7ca32..6c787ca3 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -249,7 +249,7 @@ void Vore_Swallow(entity e) void Vore_SwallowStep(entity e) { - if(!cvar("g_balance_vore_swallow_speed")) + if(!cvar("g_balance_vore_swallow_speed_fill")) { Vore_Swallow(e); return; @@ -257,7 +257,7 @@ void Vore_SwallowStep(entity e) // increase the progress value until it reaches 1, then swallow the player if(e.swallow_progress_prey < 1) - e.swallow_progress_prey += cvar("g_balance_vore_swallow_speed") * frametime; + e.swallow_progress_prey += cvar("g_balance_vore_swallow_speed_fill") * frametime; else { Vore_Swallow(e); @@ -636,6 +636,20 @@ void Vore() } } + // the swallow progress of prey and preds idly decrease by this amount + if(self.swallow_progress_pred) + { + self.swallow_progress_pred -= cvar("g_balance_vore_swallow_speed_decrease") * frametime; + if(self.swallow_progress_pred < 0) + self.swallow_progress_pred = 0; + } + if(self.swallow_progress_prey) + { + self.swallow_progress_prey -= cvar("g_balance_vore_swallow_speed_decrease") * frametime; + if(self.swallow_progress_prey < 0) + self.swallow_progress_prey = 0; + } + // apply delays and skip the vore system under some circumstances if(time < game_starttime || (time < warmup && !inWarmupStage)) // don't allow vore before a round begins { -- 2.39.2