set g_vore_neighborprey_distance 8 "Distance by which prey inside the same stomach are positioned away from each other. 0 disables seeing neighboring prey"\r
set g_vore_swallowmodel_range 100 "Distance by which the swallow model oscillates based on swallow progress"\r
\r
-set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size"\r
+set g_healthsize 1 "Players shrink and grow based on health, by this amount"\r
+set g_healthsize_center 100 "Health at which the player has the default size"\r
+set g_healthsize_min 50 "Player size may not drop below this amount of health"\r
+set g_healthsize_max 150 "Player size may not grow past this amount of health"\r
set g_healthsize_movementfactor 0.5 "Amount by which player size affects jumping and running"\r
set g_healthsize_soundfactor 0.5 "The sounds players make are amplified or reduced by this amount based on their size"\r
set g_healthsize_exteriorweapon_scalefactor 1 "Amount by which player size resizes the exterior weapon model"\r
set g_healthsize_weapon_scalefactor 1 "Amount by which player size resizes the view weapon model"\r
set g_healthsize_weapon_scalefactor_pos 10 "Amount by which the view model is moved vertically based on player size"\r
set g_healthsize_vore_shrinkdeadprey 0.25 "Dead prey will be shrunken by this amount, the closer it gets to the digestion limit"\r
-set g_healthsize_min 50 "Player size may not drop below this amount of health"\r
-set g_healthsize_max 150 "Player size may not grow past this amount of health"\r
\r
// part of an ugly hack for the menu audio sliders to work with the cutsound feature\r
seta menu_volume 1\r
g_weaponswitchdelay = ReadByte() / 255.0;\r
\r
g_vore = ReadShort();\r
- g_healthsize = ReadShort();\r
+ g_healthsize_center = ReadShort();\r
g_healthsize_min = ReadShort();\r
g_healthsize_max = ReadShort();\r
\r
float g_weaponswitchdelay;\r
\r
float g_vore;\r
-float g_healthsize, g_healthsize_min, g_healthsize_max;\r
+float g_healthsize_center, g_healthsize_min, g_healthsize_max;\r
float armor_max;\r
float teamheal_max;\r
\r
status_pos = bottomleft - '-43 168 0';\r
status_size = 16;\r
}\r
- else if(g_healthsize) // no point in showing it otherwise\r
+ else if(g_healthsize_center >= 0) // no point in showing it otherwise\r
{\r
status_text = strcat(status_color, ftos(stomach_maxload));\r
status_pos = bottomleft - '-43 170 0';\r
ent.origin_z += cvar("hud_shownames_offset");
// offset the name by player scale, decided by health
- if(g_healthsize)
- ent.origin_z -= (g_healthsize - bound(g_healthsize_min, ent.healthvalue, g_healthsize_max)) * cvar("hud_shownames_offset_healthsize");
+ if(g_healthsize_center >= 0)
+ ent.origin_z -= (g_healthsize_center - bound(g_healthsize_min, ent.healthvalue, g_healthsize_max)) * cvar("hud_shownames_offset_healthsize");
traceline(ent.origin, view_origin, TRUE, ent);
WriteByte(MSG_ENTITY, cvar("g_balance_weaponswitchdelay") * 255.0);\r
\r
WriteShort(MSG_ENTITY, cvar("g_vore"));\r
- WriteShort(MSG_ENTITY, cvar("g_healthsize"));\r
+ if(cvar("g_healthsize"))\r
+ WriteShort(MSG_ENTITY, cvar("g_healthsize_center"));\r
+ else\r
+ WriteShort(MSG_ENTITY, -1); // healthsize is disabled\r
WriteShort(MSG_ENTITY, cvar("g_healthsize_min"));\r
WriteShort(MSG_ENTITY, cvar("g_healthsize_max"));\r
\r
return;\r
\r
// change player scale based on the amount of health we have\r
- self.scale = bound(cvar("g_healthsize_min"), self.health, cvar("g_healthsize_max")) / cvar("g_healthsize");\r
+ self.scale = pow(bound(cvar("g_healthsize_min"), self.health, cvar("g_healthsize_max")) / cvar("g_healthsize_center"), cvar("g_healthsize"));\r
\r
// The following code sets the bounding box to match the player's size.\r
// It is currently disabled because of issues with engine movement prediction (cl_movement).\r