From 375402630bde3b43c7b1eb5735db5f7424191d46 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Mon, 19 Mar 2012 17:31:47 +0200 Subject: [PATCH] Cvar the swallowing speed of items, and influence based on health difference. Since items work differently, we don't do a scale comparison with the player, but a health comparison instead --- data/balanceVT.cfg | 1 + data/qcsrc/server/t_items.qc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index ba23e421..5bc0059a 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -204,6 +204,7 @@ set g_balance_vore_load_pred_speed 1 "you get this slower the more you eat, at 1 set g_balance_vore_load_pred_speedcap 800 "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_item_fill 0.01 "how long it takes to swallow a health item, offset by item health, 0 is instant" set g_balance_vore_swallow_speed_fill 2 "how long it takes to swallow a player, 0 is instant" set g_balance_vore_swallow_speed_fill_scalediff 0.5 "fill rate depends on predator size compared to prey size by this amount" set g_balance_vore_swallow_speed_fill_stomachload 1 "fill rate is influenced by the prey's stomach load by this amount" diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 6b04779f..d7decefe 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -429,7 +429,7 @@ float Item_Swallow(entity item, entity player) if(!usage) return FALSE; - item.swallow_progress_prey = min(item.swallow_progress_prey + 0.02, 1); + item.swallow_progress_prey = item.swallow_progress_prey + cvar("g_balance_vore_swallow_speed_item_fill") * (player.health / item.health); player.swallow_progress_pred = item.swallow_progress_prey; if(item.swallow_progress_prey < 1) return FALSE; // swallow progress not full yet -- 2.39.2