]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/t_items.qc
Fix the final cvars and document the new feature of swallowing items. It should now...
[voretournament/voretournament.git] / data / qcsrc / server / t_items.qc
index 9b65c50c2f5266c8ff58e177cf50ba1ec2a85351..f06ba5eadd39a67cb0dd95035db954cdd9b712f2 100644 (file)
@@ -428,9 +428,9 @@ float Item_Swallow(entity item, entity player)
        if(!usage)\r
                return FALSE;\r
 \r
-       item.swallow_progress_prey = item.swallow_progress_prey + cvar("g_balance_vore_swallow_speed_item_fill") * (player.health / item.health);\r
+       item.swallow_progress_prey = item.swallow_progress_prey + cvar("g_balance_vore_swallow_speed_fill_item") * pow(player.health / item.health, cvar("g_balance_vore_swallow_speed_fill_scalediff"));\r
        player.swallow_progress_pred = item.swallow_progress_prey;\r
-       if(item.swallow_progress_prey < 1)\r
+       if(item.swallow_progress_prey < 1 && !cvar("g_balance_vore_swallow_speed_fill_item"))\r
                return FALSE; // swallow progress not full yet\r
 \r
        if(usage > 1)\r