// {{{ stomach\r
set g_balance_vore_load_capacity 100 "capacity percent a player's stomach has, influenced by player size"\r
set g_balance_vore_load_mass 30 "prey mass, influenced by player size"\r
+set g_balance_vore_weight_gravity 1 "you get this heavier the more you eat, at 1 each meal makes you two times heavier"\r
+set g_balance_vore_weight_speed 0.15 "you get this slower the more you eat, at 0.5 each meal makes you two times slower"\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_fill 2.5 "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_digestion_scalediff 0.5 "if enabled, digestion damage is affected by the size of the predator compared to the size of the prey by this amount"\r
set g_balance_vore_teamheal 1 "when enabled, having a team mate in your stomach will keep healing them by this amount"\r
set g_balance_vore_teamheal_stable 150 "maximum amount of health you can gain from a teamheal (best kept equal or less than g_balance_health_rotstable)"\r
-set g_balance_vore_weight_gravity 1 "you get this heavier the more you eat, at 1 each meal makes you two times heavier"\r
-set g_balance_vore_weight_speed 0.15 "you get this slower the more you eat, at 0.5 each meal makes you two times slower"\r
set g_balance_vore_kick_damage 30 "amount of damage you can do during stomach kick"\r
set g_balance_vore_kick_delay 0.6 "how many seconds must pass before you can perform another stomach kick"\r
set g_balance_vore_kick_force 420 "predators are pushed by this amount when stomach kicked, in the direction their prey is facing"\r
if(!cvar("g_vore_reversescoring")) // when reverse scoring is on, it's in the interest of the prey to get eaten, so the predator has nothing to fear
{
if(skill >= 3) // make bots aware of this from skill 3 and up
- fear *= 1 + self.stomach_load; // the bigger our stomach, the less we want to put someone else in there
+ fear *= 1 + self.stomach_maxload / self.stomach_load; // the bigger our stomach, the less we want to put someone else in there
if(skill >= 5) // make bots aware of this from skill 5 and up
- fear *= 1 + prey.stomach_load; // predators fear prey that have a large stomach
+ fear *= 1 + prey.stomach_maxload / prey.stomach_load; // predators fear prey that have a large stomach
if(cvar("g_healthsize"))
fear *= (prey.scale / self.scale); // predators fear larger prey and are courageous toward smaller prey
newmodel_extension = substring(self.playermodel, strlen(self.playermodel) - 4, 4);\r
\r
float vore_state;\r
- if(self.stomach_load > self.stat_stomachmaxload * 0.6)\r
+ if(self.stomach_load > self.stomach_maxload * 0.6)\r
vore_state = 3;\r
- else if(self.stomach_load > self.stat_stomachmaxload * 0.3)\r
+ else if(self.stomach_load > self.stomach_maxload * 0.3)\r
vore_state = 2;\r
else if(self.stomach_load)\r
vore_state = 1;\r
self.stomach_load = spectatee.stomach_load;\r
self.stat_eaten = spectatee.stat_eaten;\r
self.stat_stomachload = spectatee.stat_stomachload;\r
- self.stat_stomachmaxload = spectatee.stat_stomachmaxload;\r
+ self.stomach_maxload = spectatee.stomach_maxload;\r
self.stat_digesting = spectatee.stat_digesting;\r
self.stat_canleave = spectatee.stat_canleave;\r
self.stat_canswallow = spectatee.stat_canswallow;\r
accelqw = -accelqw;\r
\r
if(cvar("g_balance_vore_weight_gravity") > 0) // apply stomach weight\r
- wishspeed *= 1 - bound(0, self.stomach_load * cvar("g_balance_vore_weight_speed"), 1);\r
+ wishspeed *= 1 - bound(0, self.stomach_maxload / self.stomach_load * cvar("g_balance_vore_weight_speed"), 1);\r
if(cvar("g_healthsize")) // if we are smaller or larger, we run slower or faster\r
wishspeed *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; \r
if(self.swallow_progress_prey) // cut speed based on swallow progress for prey\r
break;\r
case VOICETYPE_GURGLE:\r
if(self.stomach_load)\r
- sound(self, chan, sample, bound(0, vol * (self.stomach_load / self.stat_stomachmaxload), 1), ATTN_NORM);\r
+ sound(self, chan, sample, bound(0, vol * (self.stomach_load / self.stomach_maxload), 1), ATTN_NORM);\r
else\r
stopsound(self, chan);\r
break;\r
.entity fakepredator;\r
.float swallow_progress_prey, swallow_progress_pred;\r
.float digesting;\r
-.float stomach_load;\r
+.float stomach_load, stomach_maxload;\r
.float weapon_delay;\r
.float fakeprey;\r
.float stat_eaten, stat_stomachload, stat_stomachmaxload, stat_digesting, stat_canleave, stat_canswallow;\r
addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);\r
addstat(STAT_WINNING, AS_FLOAT, winning);\r
addstat(STAT_VORE_LOAD, AS_INT, stat_stomachload);\r
- addstat(STAT_VORE_MAXLOAD, AS_INT, stat_stomachmaxload);\r
+ addstat(STAT_VORE_MAXLOAD, AS_INT, stomach_maxload);\r
addstat(STAT_VORE_CANSWALLOW, AS_INT, stat_canswallow);\r
addstat(STAT_VORE_DIGESTING, AS_INT, stat_digesting);\r
addstat(STAT_VORE_EATEN, AS_INT, stat_eaten);\r
swallow_complain = "You cannot swallow your team mates\n";\r
else if(!cvar("g_vore_spawnshield") && prey.spawnshieldtime > time)\r
swallow_complain = "You cannot swallow someone protected by the spawn shield\n";\r
- else if(self.stomach_load >= self.stat_stomachmaxload)\r
+ else if(self.stomach_load >= self.stomach_maxload)\r
swallow_complain = "You do not have any more room to swallow this player.\n";\r
else if(cvar("g_vore_biggergut") && prey.stomach_load > self.stomach_load)\r
swallow_complain = "You cannot swallow someone with a bigger stomach than yours\n";\r
// slowing the player is done in cl_physics.qc\r
\r
if(e.stomach_load != e.vore_oldstomachload)\r
- e.gravity += 1 + (e.stomach_load * cvar("g_balance_vore_weight_gravity") - e.vore_oldstomachload);\r
+ e.gravity += 1 + (e.stomach_maxload / e.stomach_load * cvar("g_balance_vore_weight_gravity") - e.vore_oldstomachload);\r
if(e.gravity == 0)\r
e.gravity = 0.00001; // 0 becomes 1 for gravity, so do this to allow 0 gravity\r
e.vore_oldstomachload = e.stomach_load;\r
\r
if(time > self.digestion_step)\r
{\r
- // if distributed digestion is enabled, reduce digestion strength by the number of prey in our stomach\r
- float reduce;\r
+ // if distributed digestion is enabled, reduce digestion strength by the amount of prey in our stomach\r
+ float vore_offset;\r
if(cvar("g_balance_vore_digestion_distribute"))\r
- reduce = self.predator.stomach_load;\r
+ vore_offset = self.predator.stomach_maxload / self.predator.stomach_load;\r
else\r
- reduce = 1;\r
+ vore_offset = 1;\r
\r
float damage;\r
- damage = cvar("g_balance_vore_digestion_damage") / reduce;\r
+ damage = cvar("g_balance_vore_digestion_damage") / vore_offset;\r
\r
// apply player scale to digestion damage\r
if(cvar("g_healthsize") && cvar("g_balance_vore_digestion_scalediff"))\r
\r
Damage(self, self.predator, self.predator, damage, DEATH_DIGESTION, self.origin, '0 0 0');\r
if(cvar("g_balance_vore_digestion_vampire") && self.predator.health < cvar("g_balance_vore_digestion_vampire_stable"))\r
- self.predator.health += cvar("g_balance_vore_digestion_vampire") / reduce;\r
+ self.predator.health += cvar("g_balance_vore_digestion_vampire") / vore_offset;\r
\r
if (self.predator.digestsound_finished < time)\r
{\r
else if(self.predator.classname == "player")\r
{\r
self.stat_stomachload = self.predator.stomach_load; // necessary for the stomach board\r
- self.stat_stomachmaxload = self.predator.stat_stomachmaxload; // necessary for the stomach board\r
+ self.stat_stomachmaxload = self.predator.stomach_maxload; // necessary for the stomach board\r
self.stat_digesting = self.predator.digesting; // necessary for the stomach board\r
self.stat_eaten = num_for_edict(self.predator);\r
}\r
else\r
{\r
- float vore_capacity;\r
- vore_capacity = cvar("g_balance_vore_load_capacity");\r
- if(cvar("g_healthsize"))\r
- vore_capacity *= self.scale;\r
- vore_capacity = ceil(vore_capacity);\r
-\r
self.stat_stomachload = self.stomach_load;\r
- self.stat_stomachmaxload = vore_capacity;\r
+ self.stat_stomachmaxload = self.stomach_maxload;\r
self.stat_digesting = self.digesting;\r
self.stat_eaten = 0;\r
}\r
entity prey;\r
prey = Swallow_player_check();\r
\r
+ // set the predator's stomach capacity\r
+ self.stomach_maxload = cvar("g_balance_vore_load_capacity");\r
+ if(cvar("g_healthsize"))\r
+ self.stomach_maxload *= self.scale;\r
+ self.stomach_maxload = ceil(self.stomach_maxload);\r
+\r
// attempt to swallow our new prey if we pressed the attack button, and there's any in range\r
self.stat_canswallow = 0;\r
if(Swallow_condition_check(prey))\r