Make the swallow progress idly decrease
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index dba7ca3233d70fbf078c9c731a412b213880abb0..6c787ca3fa5ab3f6d222aedcea7f38fd7d1530e5 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