]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Cvar the swallowing speed of items, and influence based on health difference. Since...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 19 Mar 2012 15:31:47 +0000 (17:31 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 19 Mar 2012 15:31:47 +0000 (17:31 +0200)
data/balanceVT.cfg
data/qcsrc/server/t_items.qc

index ba23e421e110e30d2484fd7c50a27f5584814154..5bc0059a72618e67ae5ecfac00cdae002bdf5855 100644 (file)
@@ -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"\r
 set g_balance_vore_load_prey_mass 30 "prey mass, influenced by player size"\r
 set g_balance_vore_swallow_range 140 "distance below which you can swallow another player when facing them"\r
+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"\r
 set g_balance_vore_swallow_speed_fill 2 "how long it takes to swallow a player, 0 is instant"\r
 set g_balance_vore_swallow_speed_fill_scalediff 0.5 "fill rate depends on predator size compared to prey size by this amount"\r
 set g_balance_vore_swallow_speed_fill_stomachload 1 "fill rate is influenced by the prey's stomach load by this amount"\r
index 6b04779f1fa77ac62cdabc8fc8180f79b2d7abbb..d7decefe8472e4a95aecdedb31a70d774a14c323 100644 (file)
@@ -429,7 +429,7 @@ float Item_Swallow(entity item, entity player)
        if(!usage)\r
                return FALSE;\r
 \r
-       item.swallow_progress_prey = min(item.swallow_progress_prey + 0.02, 1);\r
+       item.swallow_progress_prey = item.swallow_progress_prey + cvar("g_balance_vore_swallow_speed_item_fill") * (player.health / item.health);\r
        player.swallow_progress_pred = item.swallow_progress_prey;\r
        if(item.swallow_progress_prey < 1)\r
                return FALSE; // swallow progress not full yet\r