if(cvar("hud_postprocessing"))\r
{\r
// change saturation based on the amount of armor we have\r
- // ranges between 0 and 50 armor. 0 armor is saturation 0.5, and 0.5 armor or above is saturation 1\r
+ // ranges between 0.5 and 1 saturation, over 0 armor and half the armor limit\r
\r
- if(cvar("hud_saturation") && armor_enabled && spectatee_status != -1 && getstati(STAT_HEALTH) > 0)\r
+ if(cvar("hud_saturation") && armor_max && spectatee_status != -1 && getstati(STAT_HEALTH) > 0)\r
{\r
float saturation;\r
- saturation = 0.5 + (getstati(STAT_ARMOR) * 1 * 0.01);\r
+ saturation = 0.5 + (getstati(STAT_ARMOR) / armor_max);\r
saturation = bound(0, saturation, 1);\r
\r
if(cvar("r_glsl_saturation") != saturation)\r
WriteCoord(MSG_ENTITY, g_balance_vore_swallow_limit);\r
\r
// tell the client if this server uses armor\r
- float armor_enabled;\r
+ float armor_max;\r
if(cvar("g_balance_armor_start") || (cvar("g_lms") && cvar("g_lms_start_armor")) /*|| (inWarmupStage && cvar("g_warmup_start_armor"))*/ || cvar("g_balance_armor_regen") || cvar("g_balance_armor_regenlinear"))\r
- armor_enabled = TRUE;\r
- WriteByte(MSG_ENTITY, armor_enabled);\r
+ armor_max = cvar("g_balance_armor_limit");\r
+ WriteCoord(MSG_ENTITY, armor_max);\r
\r
return TRUE;\r
}\r