r_mipskins 1\r
r_shadow_realtime_world_lightmaps 1\r
r_shadow_shadowmapping 1\r
+r_shadow_deferred 1\r
seta r_ambient 4\r
cl_decals_fadetime 1\r
cl_decals_time 2\r
seta hud_damage_pain_threshold_pulsating_min 0.6 "minimum value when calculating the pulse: max(pulsating_min, fabs(sin(PI * time / period))"\r
seta hud_damage_pain_threshold_pulsating_period 0.8 "one pulse every X seconds"\r
\r
-seta hud_cartoon 0 "cartoon effect, reverses when you own a powerup, default is 1.5"\r
-seta hud_cartoon_tolerance 0.15 "where to apply the cartoon effect between bright and dark areas"\r
+seta hud_powerup 0 "cartoon effect, reverses when you own a powerup, default is 1.5"\r
+seta hud_powerup_tolerance 0.15 "where to apply the cartoon effect between bright and dark areas"\r
\r
seta hud_saturation_armor 0 "saturation changes based on the amount of armor you have"\r
seta hud_saturation_death 0 "black and white vision when dead"\r
// 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
e.savedValue = 0.5; // default\r
me.TD(me, 1, 2, s);\r
me.TR(me);\r
- me.TD(me, 1, 1, e = makeVoretCheckBoxEx(1.5, 0, "hud_cartoon", "Cartoon lines"));\r
+ me.TD(me, 1, 1, e = makeVoretCheckBoxEx(1, 0, "hud_powerup", "Cartoon"));\r
+ makeMulti(e, "r_celshading r_celoutlines");\r
me.TD(me, 1, 1, e = makeVoretCheckBoxEx(0.5, 0, "hud_postprocessing_maxbluralpha", "Content blur"));\r
me.TD(me, 1, 1, e = makeVoretCheckBox(0, "hud_saturation_armor", "Saturation"));\r
makeMulti(e, "hud_saturation_death");\r