Index: cl_main.c
===================================================================
--- cl_main.c	(revision 9186)
+++ cl_main.c	(working copy)
@@ -72,6 +72,8 @@
 cvar_t cl_beams_instantaimhack = {CVAR_SAVE, "cl_beams_instantaimhack", "0", "makes your lightning gun aiming update instantly"};
 cvar_t cl_beams_lightatend = {CVAR_SAVE, "cl_beams_lightatend", "0", "make a light at the end of the beam"};
 
+cvar_t cl_deathfade = {CVAR_SAVE, "cl_deathfade", "0", "fade screen to dark red when dead, value = how fast the fade is"};
+
 cvar_t cl_noplayershadow = {CVAR_SAVE, "cl_noplayershadow", "0","hide player shadow"};
 
 cvar_t cl_dlights_decayradius = {CVAR_SAVE, "cl_dlights_decayradius", "1", "reduces size of light flashes over time"};
@@ -2238,6 +2240,7 @@
 	Cvar_RegisterVariable (&cl_anglespeedkey);
 	Cvar_RegisterVariable (&cl_shownet);
 	Cvar_RegisterVariable (&cl_nolerp);
+	Cvar_RegisterVariable (&cl_deathfade);
 	Cvar_RegisterVariable (&lookspring);
 	Cvar_RegisterVariable (&lookstrafe);
 	Cvar_RegisterVariable (&sensitivity);
Index: render.h
===================================================================
--- render.h	(revision 9186)
+++ render.h	(working copy)
@@ -173,6 +173,7 @@
 extern cvar_t r_glsl_deluxemapping;
 
 extern cvar_t gl_polyblend;
+extern cvar_t cl_deathfade;
 extern cvar_t gl_dither;
 
 extern cvar_t r_smoothnormals_areaweighting;
Index: view.c
===================================================================
--- view.c	(revision 9186)
+++ view.c	(working copy)
@@ -599,6 +599,7 @@
 
 void V_CalcViewBlend(void)
 {
+	static float timefade;
 	float a2;
 	int j;
 	r_refdef.viewblend[0] = 0;
@@ -701,11 +702,25 @@
 			a2 = 1 / r_refdef.viewblend[3];
 			VectorScale(r_refdef.viewblend, a2, r_refdef.viewblend);
 		}
-
-		r_refdef.viewblend[0] = bound(0.0f, r_refdef.viewblend[0] * (1.0f/255.0f), 1.0f);
-		r_refdef.viewblend[1] = bound(0.0f, r_refdef.viewblend[1] * (1.0f/255.0f), 1.0f);
-		r_refdef.viewblend[2] = bound(0.0f, r_refdef.viewblend[2] * (1.0f/255.0f), 1.0f);
-		r_refdef.viewblend[3] = bound(0.0f, r_refdef.viewblend[3] * gl_polyblend.value, 1.0f);
+		// Samual: Ugly hack, I know. But it's the best we can do since
+		// there is no way to detect client states from the engine.
+		if (cl.stats[STAT_HEALTH] <= 0 && cl.stats[STAT_HEALTH] != -666 && 
+			cl.stats[STAT_HEALTH] != -2342 && cl_deathfade.value > 0)
+		{
+			timefade += bound(0.0f, cl_deathfade.value, 1.0f) * max(0.0001, cl.time - cl.oldtime);
+			r_refdef.viewblend[0] = 0.3f;
+			r_refdef.viewblend[1] = 0.0f;
+			r_refdef.viewblend[2] = 0.0f;
+			r_refdef.viewblend[3] = bound(0.0f, timefade, 0.9f);
+		}
+		else
+		{
+			timefade = 0.0f;
+			r_refdef.viewblend[0] = bound(0.0f, r_refdef.viewblend[0] * (1.0f/255.0f), 1.0f);
+			r_refdef.viewblend[1] = bound(0.0f, r_refdef.viewblend[1] * (1.0f/255.0f), 1.0f);
+			r_refdef.viewblend[2] = bound(0.0f, r_refdef.viewblend[2] * (1.0f/255.0f), 1.0f);
+			r_refdef.viewblend[3] = bound(0.0f, r_refdef.viewblend[3] * gl_polyblend.value, 1.0f);
+		}
 	}
 }
 
