// enable or disable rendering types if they are used or not\r
if(cvar("r_glsl_postprocess_uservec1_enable") != (cvar("hud_postprocessing_maxbluralpha") != 0))\r
cvar_set("r_glsl_postprocess_uservec1_enable", ftos(cvar("hud_postprocessing_maxbluralpha") != 0));\r
- if(cvar("r_glsl_postprocess_uservec2_enable") != (cvar("hud_cartoon") != 0))\r
- cvar_set("r_glsl_postprocess_uservec2_enable", ftos(cvar("hud_cartoon") != 0));\r
+ if(cvar("r_glsl_postprocess_uservec2_enable") != (cvar("hud_powerup") != 0))\r
+ cvar_set("r_glsl_postprocess_uservec2_enable", ftos(cvar("hud_powerup") != 0));\r
\r
// lets apply the postprocess effects from the previous two functions if needed\r
if((damage_blurpostprocess_x || content_blurpostprocess_x) && cvar("chase_active") >= 0) // not while the event chase camera is active\r
old_bluralpha = 0;\r
}\r
\r
- if(cvar("hud_cartoon"))\r
+ if(cvar("hud_powerup"))\r
{\r
- // When having the strength or invincible powerups, cartoon lines will be white instead of black.\r
- // As powerup time goes under 5 seconds (warning time), lines will fade from white to nothing then from nothing back to black.\r
- float cartoon_intensity, cartoon_powerup;\r
- cartoon_intensity = -cvar("hud_cartoon");\r
- cartoon_powerup = bound(0, getstatf(STAT_STRENGTH_FINISHED) - time, 5) + bound(0, getstatf(STAT_INVINCIBLE_FINISHED) - time, 5);\r
- cartoon_powerup = bound(0, cartoon_powerup, 5);\r
- if (cartoon_powerup && cvar("chase_active") >= 0) // not while the event chase camera is active\r
- cartoon_intensity *= 1 - cartoon_powerup / 2.5; // cycle between -1 and 1\r
+ // When having the strength or invincible powerups, enable white outlines\r
+ // As powerup time goes under 5 seconds (warning time) the lines fade away\r
+ float cartoon_intensity;\r
+\r
+ if((getstatf(STAT_STRENGTH_FINISHED) >= time || getstatf(STAT_INVINCIBLE_FINISHED) >= time) && cvar("chase_active") >= 0)\r
+ {\r
+ // not while the event chase camera is active\r
+ cartoon_intensity = bound(0, getstatf(STAT_STRENGTH_FINISHED) - time, 5) + bound(0, getstatf(STAT_INVINCIBLE_FINISHED) - time, 5);\r
+ cartoon_intensity = cvar("hud_powerup") * bound(0, cartoon_intensity, 5);\r
+ }\r
+ else\r
+ cartoon_intensity = 0;\r
\r
if(cartoon_intensity != old_cartoon_intensity) // reduce cvar_set spam as much as possible\r
{\r
- cvar_set("r_glsl_postprocess_uservec2", strcat("0 ", ftos(cartoon_intensity), " ", cvar_string("hud_cartoon_tolerance"), " 0"));\r
+ cvar_set("r_glsl_postprocess_uservec2", strcat("0 ", ftos(cartoon_intensity), " ", cvar_string("hud_powerup_tolerance"), " 0"));\r
old_cartoon_intensity = cartoon_intensity;\r
}\r
}\r
cvar_set("r_glsl_postprocess_uservec1", "0 0 0 0");\r
cvar_set("r_glsl_postprocess_uservec1_enable", "0");\r
}\r
- if(cvar("hud_postprocessing") && !cvar("hud_cartoon"))\r
+ if(cvar("hud_postprocessing") && !cvar("hud_powerup"))\r
if(cvar("r_glsl_postprocess_uservec2_enable"))\r
{\r
// don't allow sharpen to get stuck on if we disable the cvar while powered up\r