set g_balance_vore_regurgitate_prey_punchvector 50 "your view gets lowered by this amount when getting regurgitated"\r
set g_balance_vore_digestion_damage 4 "amount of damage applied to victims during digestion"\r
set g_balance_vore_digestion_damage_death 2 "amplify digestion damage by this amount when the prey is dead"\r
+set g_balance_vore_digestion_damage_item 2 "amount of damage applied to items during digestion"\r
set g_balance_vore_digestion_limit -100 "prey can be digested down to this amount of health"\r
set g_balance_vore_digestion_limit_regurgitate 1 "the predator automatically regurgitates prey that has reached the digestion limit"\r
set g_balance_vore_digestion_limit_blockrespawn 1 "dead prey cannot respawn if it's still being digested"\r
}\r
\r
.float inithealth;\r
+.float item_digestion_step;\r
void Item_Consumable_Remove(entity e, float regurgitate);\r
void Item_Consumable_Think()\r
{\r
\r
if(self.predator.digesting)\r
{\r
- self.scale = self.health / self.inithealth; // scale matches the item's digestion progress\r
+ if(time > self.item_digestion_step)\r
+ {\r
+ // if distributed digestion is enabled, reduce digestion strength by the amount of prey in our stomach\r
+ float damage, damage_offset;\r
+\r
+ damage_offset = 1;\r
+ if(cvar("g_balance_vore_digestion_distribute")) // apply distributed digestion damage\r
+ damage_offset *= self.predator.stomach_load / self.predator.stomach_maxload;\r
+ damage_offset = ceil(damage_offset);\r
+ damage = cvar("g_balance_vore_digestion_damage_item") / damage_offset;\r
+\r
+ self.health -= damage;\r
+ self.predator.health += damage;\r
+ self.scale = self.health / self.inithealth; // scale matches the item's digestion progress\r
+ }\r
\r
if(stov(cvar_string("g_vore_regurgitatecolor_color_digest")))\r
self.colormod = stov(cvar_string("g_vore_regurgitatecolor_color_digest"));\r
+\r
+ self.item_digestion_step = time + vore_steptime;\r
}\r
\r
self.nextthink = time;\r
const float system_delay_time = 0.1;\r
const float complain_delay_time = 1;\r
const float button_delay_time = 0.5;\r
-const float steptime = 0.1;\r
\r
entity Swallow_player_check()\r
{\r
PlayerSound (self.predator, playersound_digest, CHAN_PLAYER, VOICETYPE_PLAYERSOUND);\r
self.predator.digestsound_finished = time + 0.5;\r
}\r
- self.digestion_step = time + steptime;\r
+ self.digestion_step = time + vore_steptime;\r
}\r
\r
if(stov(cvar_string("g_vore_regurgitatecolor_color_digest")))\r
if(time > self.teamheal_step)\r
{\r
self.health += cvar("g_balance_vore_teamheal");\r
- self.teamheal_step = time + steptime;\r
+ self.teamheal_step = time + vore_steptime;\r
\r
// play beep sound when a team mate was healed to the maximum amount, to both the prey and the predator\r
if(self.health >= cvar("g_balance_vore_teamheal_stable"))\r
+const float vore_steptime = 0.1;\r
+\r
void Vore();\r
void Vore_Disconnect();\r
.float regurgitate_prepare;\r
\r
entity Swallow_player_check();\r
float Swallow_condition_check(entity prey);\r
-float Stomach_HasLivePrey(entity pred);
\ No newline at end of file
+float Stomach_HasLivePrey(entity pred);\r