From 96b08a2637da12b4f55e4960fcb23bedd8c3a77a Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Fri, 10 Sep 2010 00:13:26 +0300 Subject: [PATCH] Fix the stealprey feature. Now it finally works as it should be --- data/qcsrc/server/vore.qc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 151cad9d..21897883 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -328,19 +328,21 @@ void Vore() // this code has a high priority and must not be stopped by any delay, so run it here if(self.predator.predator.classname == "player") { + entity target_predator, target_predator_predator, oldself; + target_predator = self.predator; + target_predator_predator = self.predator.predator; + Vore_Regurgitate(self); // now steal our prey's prey if this probability applies - entity target_predator, oldself; - target_predator = self.predator.predator; - if(random() < cvar("g_vore_stealprey")) - if(Swallow_condition_check(self)) - if not(teams_matter && self.predator.team == target_predator.team) // don't steal a team mate's prey { oldself = self; - self = target_predator; - Vore_Swallow(oldself); + self = target_predator_predator; + if(Swallow_condition_check(oldself)) + if not(teams_matter && self.team == target_predator.team) // don't steal a team mate's prey + if not(teams_matter && self.team == oldself.team) // if the prey we would be stealing is a team mate, don't do it + Vore_Swallow(oldself); self = oldself; } } -- 2.39.2