\r
if(!cvar("g_vore_digestion") || e.digesting)\r
return;\r
- if(clienttype(e) != CLIENTTYPE_REAL)\r
- return; // this feature is only for players, not bots\r
+ if(g_rpg)\r
+ return; // RPG is choice based, so don't do things automatically there\r
if(e.stomach_load)\r
return; // don't start digestion if we already ate someone, as that means we manually disabled it after the first prey and want it off\r
+ if(clienttype(e) != CLIENTTYPE_REAL)\r
+ return; // this feature is only for players, not bots\r
if(Stomach_TeamMates_check(e))\r
return; // never begin automatic digestion if we've swallowed a team mate\r
\r
self.stomach_load = final_load;\r
\r
// apply weight\r
- self.gravity = 1 + (self.stomach_load / self.stomach_maxload) * cvar("g_balance_vore_load_pred_weight");\r
+ self.gravity = 1 * (cvar("g_healthsize") ? pow(self.scale, cvar("g_healthsize_weight")) : 1) + (self.stomach_load / self.stomach_maxload) * cvar("g_balance_vore_load_pred_weight");\r
if(!self.gravity && self.stomach_load)\r
self.gravity = 0.00001; // 0 becomes 1 for gravity, so do this to allow 0 gravity\r
}\r
if(cvar("g_balance_vore_swallow_speed_fill_stomachload") && e.stomach_load) // fill rate is influenced by the prey's stomach load\r
fill *= (1 - ((e.stomach_load / e.stomach_maxload) * bound(0, cvar("g_balance_vore_swallow_speed_fill_stomachload"), 1)));\r
\r
+ // skill-based speed offset for bots\r
+ if(skill && cvar("skill_offset"))\r
+ {\r
+ float ofs;\r
+ ofs = pow(skill / cvar("skill_offset_center"), cvar("skill_offset"));\r
+ if(clienttype(self) == CLIENTTYPE_BOT)\r
+ fill *= ofs;\r
+ if(clienttype(e) == CLIENTTYPE_BOT)\r
+ fill /= ofs;\r
+ }\r
+\r
e.swallow_progress_prey += fill;\r
}\r
else\r
\r
PlayerSound(e.predator, playersound_regurgitate, CHAN_VOICE, VOICETYPE_PLAYERSOUND);\r
setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r
- pointparticles(particleeffectnum("vore_regurgitate"), e.predator.origin, '0 0 0', 1);\r
+ pointparticles(particleeffectnum("vore_regurgitate"), e.predator.origin, '0 0 0', floor(scalediff * PARTICLE_MULTIPLIER));\r
e.predator.punchangle_x = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle") * scalediff;\r
e.predator.punchangle_y = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle") * scalediff;\r
e.predator.punchangle_z = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle") * scalediff;\r
e.predator = world;\r
}\r
\r
-void Vore_Disconnect()\r
+void Vore_Disconnect(float consumables)\r
{\r
// frees prey from their predators when someone disconnects or goes spectating, or in other circumstances\r
entity e;\r
Vore_Regurgitate(head);\r
}\r
// remove consumable items when we disconnect\r
- for(e = world; (e = find(e, classname, "consumable")); )\r
+ if(consumables)\r
{\r
- if(e.predator == self)\r
- Item_Consumable_Remove(e, TRUE);\r
+ for(e = world; (e = find(e, classname, "consumable")); )\r
+ {\r
+ if(e.predator == self)\r
+ Item_Consumable_Remove(e, TRUE);\r
+ }\r
}\r
\r
self.stomach_load = self.gravity = 0; // prevents a bug\r
if(cvar("g_vore_regurgitatecolor_particles"))\r
if(self.regurgitatecolor_particles_tick < time)\r
{\r
- pointparticles(particleeffectnum("vore_regurgitate_constant"), self.origin, '0 0 0', 1);\r
+ pointparticles(particleeffectnum("vore_regurgitate_constant"), self.origin, '0 0 0', floor((cvar("g_healthsize") ? self.scale : 1) * PARTICLE_MULTIPLIER));\r
self.regurgitatecolor_particles_tick = time + cvar("g_vore_regurgitatecolor_particles") * vlen(self.colormod); // particle time depends on how dirty the player is\r
}\r
}\r
// apply delays and skip the vore system under some circumstances\r
if(!cvar("g_vore")) // the vore system is disabled\r
{\r
- Vore_Disconnect();\r
+ Vore_Disconnect(TRUE);\r
return;\r
}\r
if(time < game_starttime || (time < warmup && !inWarmupStage)) // don't allow vore before a round begins\r
{\r
- Vore_Disconnect();\r
+ Vore_Disconnect(FALSE);\r
return;\r
}\r
if(self.spectatee_status)\r