]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Fix a bug that caused the stomach load to be filtered by a delay, which was pretty...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 18 Jul 2011 16:53:14 +0000 (19:53 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 18 Jul 2011 16:53:14 +0000 (19:53 +0300)
data/qcsrc/server/vore.qc

index f2b782d30bd4058a24254d59fe521bf95447350a..078c5b4fd76f3501e4fab6617e158fe0370b2636 100644 (file)
@@ -162,7 +162,7 @@ void Vore_StomachLoad_Apply()
        self.stomach_load = 0; // start from zero\r
        FOR_EACH_PLAYER(e)\r
        {\r
-               if(e.predator == self && e.classname == "player")\r
+               if(e.predator == self)\r
                {\r
                        prey_mass = cvar("g_balance_vore_load_prey_mass");\r
                        if(cvar("g_healthsize"))\r
@@ -746,6 +746,9 @@ void Vore()
                }\r
        }\r
 \r
+       // set the predator's stomach load and capacity\r
+       Vore_StomachLoad_Apply();\r
+\r
        // apply delays and skip the vore system under some circumstances\r
        if(!cvar("g_vore")) // the vore system is disabled\r
        {\r
@@ -769,9 +772,6 @@ void Vore()
        entity prey;\r
        prey = Swallow_player_check();\r
 \r
-       // set the predator's stomach load and capacity\r
-       Vore_StomachLoad_Apply();\r
-\r
        // attempt to swallow our new prey if we pressed the attack button, and there's any in range\r
        self.stat_canswallow = 0;\r
        if(Swallow_condition_check(prey))\r
@@ -861,6 +861,7 @@ void Vore()
        }\r
        if(cvar("g_balance_vore_load_pred_speedcap") && vlen(self.predator.velocity) >= cvar("g_balance_vore_load_pred_speedcap") / (self.predator.stomach_load / self.predator.stomach_maxload)) // predator's going too fast, gets sick and throws up\r
        {\r
+dprint(strcat(ftos(cvar("g_balance_vore_load_pred_speedcap") / (self.predator.stomach_load / self.predator.stomach_maxload)), " --------\n"));\r
                Vore_Regurgitate(self);\r
                return;\r
        }\r