From: MirceaKitsune Date: Mon, 18 Jul 2011 16:53:14 +0000 (+0300) Subject: Fix a bug that caused the stomach load to be filtered by a delay, which was pretty... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=77378576c87b24d91e9317f3fa2ad0c9507cef06;p=voretournament%2Fvoretournament.git Fix a bug that caused the stomach load to be filtered by a delay, which was pretty bad to do. --- diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index f2b782d3..078c5b4f 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -162,7 +162,7 @@ void Vore_StomachLoad_Apply() self.stomach_load = 0; // start from zero FOR_EACH_PLAYER(e) { - if(e.predator == self && e.classname == "player") + if(e.predator == self) { prey_mass = cvar("g_balance_vore_load_prey_mass"); if(cvar("g_healthsize")) @@ -746,6 +746,9 @@ void Vore() } } + // set the predator's stomach load and capacity + Vore_StomachLoad_Apply(); + // apply delays and skip the vore system under some circumstances if(!cvar("g_vore")) // the vore system is disabled { @@ -769,9 +772,6 @@ void Vore() entity prey; prey = Swallow_player_check(); - // set the predator's stomach load and capacity - Vore_StomachLoad_Apply(); - // attempt to swallow our new prey if we pressed the attack button, and there's any in range self.stat_canswallow = 0; if(Swallow_condition_check(prey)) @@ -861,6 +861,7 @@ void Vore() } 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 { +dprint(strcat(ftos(cvar("g_balance_vore_load_pred_speedcap") / (self.predator.stomach_load / self.predator.stomach_maxload)), " --------\n")); Vore_Regurgitate(self); return; }