From: MirceaKitsune Date: Mon, 18 Jul 2011 13:06:44 +0000 (+0300) Subject: Adapt the speedcap to the new system X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4a86829e902e15d86f9d969a27bd5173b50c680b;p=voretournament%2Fvoretournament.git Adapt the speedcap to the new system --- diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index bafb2691..a444577f 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -188,7 +188,7 @@ set g_balance_grabber_reload_time 2 set g_balance_vore_load_pred_capacity 100 "capacity percent a player's stomach has, influenced by player size" set g_balance_vore_load_pred_weight 1 "you get this heavier the more you eat, at 1 each meal makes you two times heavier" set g_balance_vore_load_pred_speed 0.0015 "you get this slower the more you eat, at 0.5 each meal makes you two times slower" -set g_balance_vore_load_pred_speedcap 34 "when a predator is going faster than this, their prey is squeezed out of them, multiplied by stomach load" +set g_balance_vore_load_pred_speedcap 400 "when a predator is going faster than this (at full stomach capacity), their prey is squeezed out of them" set g_balance_vore_load_prey_mass 30 "prey mass, influenced by player size" set g_balance_vore_swallow_range 140 "distance below which you can swallow another player when facing them" set g_balance_vore_swallow_speed_fill 2.5 "how long it takes to swallow a player, 0 is instant" diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 968f3711..771203bd 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -40,7 +40,7 @@ float Swallow_condition_check(entity prey) if(prey.classname == "player" && !prey.stat_eaten && prey.deadflag == DEAD_NO) // we can't swallow someone who's already in someone else's stomach if(self.classname == "player" && !self.stat_eaten && self.deadflag == DEAD_NO) // we can't swallow players while inside someone's stomach ourselves if(!self.BUTTON_REGURGITATE && time > self.action_delay) - if not(cvar("g_balance_vore_load_pred_speedcap") && vlen(self.velocity) > cvar("g_balance_vore_load_pred_speedcap") / (self.stomach_maxload / self.stomach_load)) + if not(cvar("g_balance_vore_load_pred_speedcap") && vlen(self.velocity) >= (self.stomach_load / self.stomach_maxload) / cvar("g_balance_vore_load_pred_speedcap")) { string swallow_complain; if(teams_matter && prey.team == self.team && !cvar("g_vore_teamvore")) @@ -183,6 +183,12 @@ void Vore_StomachLoad_Apply() entity e; float vore_mass; + // apply the stomach capacity of the predator + self.stomach_maxload = cvar("g_balance_vore_load_pred_capacity"); + if(cvar("g_healthsize")) + self.stomach_maxload *= self.scale; + self.stomach_maxload = floor(self.stomach_maxload); + self.stomach_load = 0; // start from zero FOR_EACH_PLAYER(e) { @@ -195,12 +201,6 @@ void Vore_StomachLoad_Apply() } } - // apply the stomach capacity of the predator - self.stomach_maxload = cvar("g_balance_vore_load_pred_capacity"); - if(cvar("g_healthsize")) - self.stomach_maxload *= self.scale; - self.stomach_maxload = floor(self.stomach_maxload); - // apply weight self.gravity = 1 + (self.stomach_load / self.stomach_maxload) * cvar("g_balance_vore_load_pred_weight"); if(!self.gravity && self.stomach_load) @@ -884,7 +884,7 @@ void Vore() if(self.predator.deadflag != DEAD_NO) Vore_Regurgitate(self); - else if(cvar("g_balance_vore_load_pred_speedcap") && vlen(self.predator.velocity) > cvar("g_balance_vore_load_pred_speedcap") / (self.stomach_maxload / self.stomach_load)) + else if(cvar("g_balance_vore_load_pred_speedcap") && vlen(self.velocity) >= (self.stomach_load / self.stomach_maxload) / cvar("g_balance_vore_load_pred_speedcap")) Vore_Regurgitate(self); // apply delayed regurgitating if it was scheduled