// }}}\r
\r
// {{{ 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_swallow_range 140 "distance below which you can swallow another player when facing them"\r
-set g_balance_vore_swallow_limit 3 "how many players can fit in the stomach at a time, may range between 1 and 9"\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_swallow_speed_fill_stomachload 1 "fill rate is influenced by the prey's stomach load"\r
g_weaponswitchdelay = ReadByte() / 255.0;\r
\r
g_vore = ReadShort();\r
- g_balance_vore_swallow_limit = ReadShort();\r
g_healthsize = ReadShort();\r
g_healthsize_min = ReadShort();\r
g_healthsize_max = ReadShort();\r
float g_weaponswitchdelay;\r
\r
float g_vore;\r
-float g_balance_vore_swallow_limit;\r
float g_healthsize, g_healthsize_min, g_healthsize_max;\r
float armor_max;\r
float teamheal_max;\r
drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(hl_color), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
drawstring(bottomleft - '-80 173 0', hl_string, '11 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
- float stomach_load;\r
- stomach_load = getstati(STAT_VORE_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise\r
+ float stomach_load, stomach_maxload; // shows the predator's stomach load when we are eaten, and ours otherwise\r
+ stomach_load = getstati(STAT_VORE_LOAD);\r
+ stomach_maxload = getstati(STAT_VORE_MAXLOAD);\r
\r
vector status_pos;\r
string status_text;\r
- status_text = strcat(ftos(bound(0, stomach_load, 9)), "/", ftos(bound(0, g_balance_vore_swallow_limit, 9)));\r
+ status_text = strcat(ftos(stomach_load), "/", ftos(stomach_maxload));\r
status_pos = bottomleft - '-44 171 0';\r
status_pos -= '1 0 0' * stringwidth(status_text, FALSE, '22 22 0') * 0.5;\r
drawstring(status_pos, status_text, '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
const float STAT_WEAPON_CLIPSIZE = 50;\r
const float STAT_LAST_PICKUP = 51;\r
const float STAT_VORE_LOAD = 52;\r
-const float STAT_VORE_DIGESTING = 53;\r
-const float STAT_VORE_EATEN = 54;\r
-const float STAT_VORE_CANLEAVE = 55;\r
-const float STAT_VORE_CANSWALLOW = 56;\r
-const float STAT_SBRING1_TYPE = 57;\r
-const float STAT_SBRING1_CLIP = 58;\r
-const float STAT_SBRING2_TYPE = 59;\r
-const float STAT_SBRING2_CLIP = 60;\r
+const float STAT_VORE_MAXLOAD = 53;\r
+const float STAT_VORE_DIGESTING = 54;\r
+const float STAT_VORE_EATEN = 55;\r
+const float STAT_VORE_CANLEAVE = 56;\r
+const float STAT_VORE_CANSWALLOW = 57;\r
+const float STAT_SBRING1_TYPE = 58;\r
+const float STAT_SBRING1_CLIP = 59;\r
+const float STAT_SBRING2_TYPE = 60;\r
+const float STAT_SBRING2_CLIP = 61;\r
+const float STAT_HUD = 62;\r
+const float HUD_NORMAL = 0;\r
const float CTF_STATE_ATTACK = 1;\r
const float CTF_STATE_DEFEND = 2;\r
const float CTF_STATE_COMMANDER = 3;\r
\r
-const float STAT_HUD = 61;\r
-const float HUD_NORMAL = 0;\r
-\r
// moved that here so the client knows the max.\r
// # of maps, I'll use arrays for them :P\r
#define MAPVOTE_COUNT 10\r
newmodel_extension = substring(self.playermodel, strlen(self.playermodel) - 4, 4);\r
\r
float vore_state;\r
- if(self.stomach_load > ceil(g_balance_vore_swallow_limit * 0.6))\r
+ if(self.stomach_load > self.stat_stomachmaxload * 0.6)\r
vore_state = 3;\r
- else if(self.stomach_load > ceil(g_balance_vore_swallow_limit * 0.3))\r
+ else if(self.stomach_load > self.stat_stomachmaxload * 0.3)\r
vore_state = 2;\r
else if(self.stomach_load)\r
vore_state = 1;\r
WriteByte(MSG_ENTITY, cvar("g_balance_weaponswitchdelay") * 255.0);\r
\r
WriteShort(MSG_ENTITY, cvar("g_vore"));\r
- WriteShort(MSG_ENTITY, g_balance_vore_swallow_limit);\r
WriteShort(MSG_ENTITY, cvar("g_healthsize"));\r
WriteShort(MSG_ENTITY, cvar("g_healthsize_min"));\r
WriteShort(MSG_ENTITY, cvar("g_healthsize_max"));\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.stat_digesting = spectatee.stat_digesting;\r
self.stat_canleave = spectatee.stat_canleave;\r
self.stat_canswallow = spectatee.stat_canswallow;\r
break;\r
case VOICETYPE_GURGLE:\r
if(self.stomach_load)\r
- sound(self, chan, sample, vol * self.stomach_load / g_balance_vore_swallow_limit, ATTN_NORM);\r
+ sound(self, chan, sample, bound(0, vol * (self.stomach_load / self.stat_stomachmaxload), 1), ATTN_NORM);\r
else\r
stopsound(self, chan);\r
break;\r
\r
float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_ca, g_lms, g_race, g_cts, g_rpg;\r
float g_cloaked, g_footsteps, g_jump_grunt, g_midair, g_norecoil, g_vampire, g_bloodloss;\r
-float g_balance_vore_swallow_limit;\r
float g_warmup_limit;\r
float g_warmup_allguns;\r
float g_warmup_allow_timeout;\r
.float stomach_load;\r
.float weapon_delay;\r
.float fakeprey;\r
-.float stat_eaten, stat_stomachload, stat_digesting, stat_canleave, stat_canswallow;\r
+.float stat_eaten, stat_stomachload, stat_stomachmaxload, stat_digesting, stat_canleave, stat_canswallow;\r
.float dropweapon_check;\r
\r
// Fields\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_CANSWALLOW, AS_INT, stat_canswallow);\r
addstat(STAT_VORE_DIGESTING, AS_INT, stat_digesting);\r
addstat(STAT_VORE_EATEN, AS_INT, stat_eaten);\r
g_norecoil = cvar("g_norecoil");\r
g_vampire = cvar("g_vampire");\r
g_bloodloss = cvar("g_bloodloss");\r
- g_balance_vore_swallow_limit = bound(1, cvar("g_balance_vore_swallow_limit"), 9); // may only range between 1 and 9\r
sv_maxidle = cvar("sv_maxidle");\r
sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");\r
sv_pogostick = cvar("sv_pogostick");\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 >= g_balance_vore_swallow_limit)\r
- swallow_complain = strcat("You cannot swallow more than ^2", ftos(g_balance_vore_swallow_limit), "^7 players at a time\n");\r
+ else if(self.stomach_load >= self.stat_stomachmaxload)\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
else if(cvar("g_vore_biggersize") && prey.scale > self.scale)\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_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_digesting = self.digesting;\r
self.stat_eaten = 0;\r
}\r