]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Make prey pop out of the predator if the pred becomes beyond his capacity
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 18 Jul 2011 15:04:31 +0000 (18:04 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 18 Jul 2011 15:04:31 +0000 (18:04 +0300)
data/qcsrc/server/vore.qc

index 4870d4658170f1473463249c371bfb232d2daaef..617fd02a907c90d39e1fa8af45c4a7777148998c 100644 (file)
@@ -837,24 +837,33 @@ void Vore()
 // Code that addresses the prey:\r
 // --------------------------------\r
 \r
-       // keepdeadprey - detach dead prey if their predator died or got swallowed\r
-       if(self.fakeprey)\r
-       if(self.fakepredator.deadflag != DEAD_NO || self.fakepredator.stat_eaten)\r
-               Vore_DeadPrey_Detach(self);\r
-\r
        if(!self.stat_eaten)\r
                return;\r
 \r
-       if(self.deadflag != DEAD_NO)\r
+       if(self.deadflag != DEAD_NO) // we're dead, do what we must\r
        {\r
                Vore_PreyRelease(self, FALSE);\r
                return;\r
        }\r
 \r
-       if(self.predator.deadflag != DEAD_NO)\r
+       if(self.fakeprey) // detach dead prey if their predator died or got eaten\r
+       if(self.fakepredator.deadflag != DEAD_NO || self.fakepredator.stat_eaten)\r
+               Vore_DeadPrey_Detach(self);\r
+       if(self.predator.deadflag != DEAD_NO) // do we want to be in a dead furry x_x\r
+       {\r
+               Vore_Regurgitate(self);\r
+               return;\r
+       }\r
+       if(self.predator.stomach_load > self.predator.stomach_maxload) // the predator got beyond his capacity after eating, so some prey must pop out\r
+       {\r
                Vore_Regurgitate(self);\r
-       else 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))\r
+               return;\r
+       }\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
                Vore_Regurgitate(self);\r
+               return;\r
+       }\r
 \r
        // apply delayed regurgitating if it was scheduled\r
        if(self.predator.regurgitate_prepare && time > self.predator.regurgitate_prepare)\r