From: MirceaKitsune Date: Mon, 19 Mar 2012 16:33:00 +0000 (+0200) Subject: An important improvement to my last commit X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=acab492a056fe59fce467172a94f3452ec640df1;p=voretournament%2Fvoretournament.git An important improvement to my last commit --- diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index f06ba5ea..a382d710 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -428,10 +428,14 @@ float Item_Swallow(entity item, entity player) if(!usage) return FALSE; - 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")); + // since map items don't have a scale, calculate one based on player size center and the item's health, in order to determine swallowing speed + float scalediff; + scalediff = pow((item.health / cvar("g_healthsize_center")) / player.scale, cvar("g_balance_vore_swallow_speed_fill_scalediff")); + + item.swallow_progress_prey += cvar("g_balance_vore_swallow_speed_fill_item") / scalediff; player.swallow_progress_pred = item.swallow_progress_prey; - if(item.swallow_progress_prey < 1 && !cvar("g_balance_vore_swallow_speed_fill_item")) - return FALSE; // swallow progress not full yet + if(item.swallow_progress_prey < 1 && cvar("g_balance_vore_swallow_speed_fill_item")) + return FALSE; // swallow progress not full yet, or slow swallowing of items is disabled if(usage > 1) { diff --git a/docs/TODO.txt b/docs/TODO.txt index 11a809f6..aaa4bcea 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -114,8 +114,6 @@ - 0.8: Does item alpha break any game modes, now that slow swallowing items are implemented? -- 0.8: What should depend on health difference and what should depend on size difference between items and players, for swallowing items? - - 0.8: Should items always be swallowed by standing over them only? - 0.8: Don't allow macros in the tutorial map (use health rot), since their weight makes it impossible to pass some parts