From 729266a346a97c7b105d0a7f1df237a04e4343c6 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 19 Nov 2011 19:53:31 +0200 Subject: [PATCH] Actually fix the last bug. Amazing what trouble the smallest piece of code can be -.- --- data/qcsrc/server/vore.qc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index c690955f..d89de475 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -170,7 +170,7 @@ void Vore_StomachLoad_Apply() return; entity e; - float prey_mass; + float prey_mass, final_load; // apply the stomach capacity of the predator self.stomach_maxload = cvar("g_balance_vore_load_pred_capacity"); @@ -178,28 +178,28 @@ void Vore_StomachLoad_Apply() self.stomach_maxload *= self.scale; self.stomach_maxload = ceil(self.stomach_maxload); - self.stomach_load = 0; // start from zero FOR_EACH_PLAYER(e) { if(e.predator == self) { + if(self.cvar_cl_vore_autodigest > 1) + Vore_AutoDigest(self); prey_mass = cvar("g_balance_vore_load_prey_mass"); if(cvar("g_healthsize")) prey_mass *= e.scale; - self.stomach_load += ceil(prey_mass); - if(self.cvar_cl_vore_autodigest > 1) - Vore_AutoDigest(self); + final_load += ceil(prey_mass); } } for(e = world; (e = find(e, classname, "consumable")); ) { if(e.predator == self) { - self.stomach_load += ceil(e.dmg); if(self.cvar_cl_vore_autodigest > 0) Vore_AutoDigest(self); + final_load += ceil(e.dmg); } } + self.stomach_load = final_load; // apply weight self.gravity = 1 + (self.stomach_load / self.stomach_maxload) * cvar("g_balance_vore_load_pred_weight"); -- 2.39.2