Make the swallow progress idly decrease
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 14:03:59 +0000 (17:03 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 14:03:59 +0000 (17:03 +0300)
data/balanceVT.cfg
data/qcsrc/server/vore.qc

index 15e91bd..519a65b 100644 (file)
@@ -187,6 +187,8 @@ set g_balance_grabber_reload_time 2
 // {{{ stomach\r
 set g_balance_vore_swallow_range 100 "distance below which you can swallow another player when facing them"\r
 set g_balance_vore_swallow_limit 3 "how many players can fit in the stomach at a time, may range between 1 and 9"\r
+set g_balance_vore_swallow_speed_fill 2 "how long it takes to swallow a player, 0 is instant"\r
+set g_balance_vore_swallow_speed_decrease 0.5 "how fast the swallow progress decreases, when the predator is no longer swallowing"\r
 set g_balance_vore_swallow_speed 1 "how long it takes to swallow a player"\r
 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"\r
 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"\r
index dba7ca3..6c787ca 100644 (file)
@@ -249,7 +249,7 @@ void Vore_Swallow(entity e)
 \r
 void Vore_SwallowStep(entity e)\r
 {\r
-       if(!cvar("g_balance_vore_swallow_speed"))\r
+       if(!cvar("g_balance_vore_swallow_speed_fill"))\r
        {\r
                Vore_Swallow(e);\r
                return;\r
@@ -257,7 +257,7 @@ void Vore_SwallowStep(entity e)
 \r
        // increase the progress value until it reaches 1, then swallow the player\r
        if(e.swallow_progress_prey < 1)\r
-               e.swallow_progress_prey += cvar("g_balance_vore_swallow_speed") * frametime;\r
+               e.swallow_progress_prey += cvar("g_balance_vore_swallow_speed_fill") * frametime;\r
        else\r
        {\r
                Vore_Swallow(e);\r
@@ -636,6 +636,20 @@ void Vore()
                }\r
        }\r
 \r
+       // the swallow progress of prey and preds idly decrease by this amount\r
+       if(self.swallow_progress_pred)\r
+       {\r
+               self.swallow_progress_pred -= cvar("g_balance_vore_swallow_speed_decrease") * frametime;\r
+               if(self.swallow_progress_pred < 0)\r
+                       self.swallow_progress_pred = 0;\r
+       }\r
+       if(self.swallow_progress_prey)\r
+       {\r
+               self.swallow_progress_prey -= cvar("g_balance_vore_swallow_speed_decrease") * frametime;\r
+               if(self.swallow_progress_prey < 0)\r
+                       self.swallow_progress_prey = 0;\r
+       }\r
+\r
        // apply delays and skip the vore system under some circumstances\r
        if(time < game_starttime || (time < warmup && !inWarmupStage)) // don't allow vore before a round begins\r
        {\r