From 0f43d10098e279dacb942d43389d3cea52914490 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Mon, 18 Jul 2011 18:04:31 +0300 Subject: [PATCH] Make prey pop out of the predator if the pred becomes beyond his capacity --- data/qcsrc/server/vore.qc | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 4870d465..617fd02a 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -837,24 +837,33 @@ void Vore() // Code that addresses the prey: // -------------------------------- - // keepdeadprey - detach dead prey if their predator died or got swallowed - if(self.fakeprey) - if(self.fakepredator.deadflag != DEAD_NO || self.fakepredator.stat_eaten) - Vore_DeadPrey_Detach(self); - if(!self.stat_eaten) return; - if(self.deadflag != DEAD_NO) + if(self.deadflag != DEAD_NO) // we're dead, do what we must { Vore_PreyRelease(self, FALSE); return; } - if(self.predator.deadflag != DEAD_NO) + if(self.fakeprey) // detach dead prey if their predator died or got eaten + if(self.fakepredator.deadflag != DEAD_NO || self.fakepredator.stat_eaten) + Vore_DeadPrey_Detach(self); + if(self.predator.deadflag != DEAD_NO) // do we want to be in a dead furry x_x + { + Vore_Regurgitate(self); + return; + } + if(self.predator.stomach_load > self.predator.stomach_maxload) // the predator got beyond his capacity after eating, so some prey must pop out + { Vore_Regurgitate(self); - 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)) + return; + } + 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 + { Vore_Regurgitate(self); + return; + } // apply delayed regurgitating if it was scheduled if(self.predator.regurgitate_prepare && time > self.predator.regurgitate_prepare) -- 2.39.2