]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Chase camera when dead. Pretty effect used in many shooters. Its usefulness will...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Mar 2011 16:06:59 +0000 (18:06 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Mar 2011 16:06:59 +0000 (18:06 +0200)
qcsrc/client/View.qc

index f994645873866646bed118fc93235cb14a1a9d8a..d28858ed9b41664470eb39187d444ca9983c6953 100644 (file)
@@ -794,6 +794,17 @@ void CSQC_UpdateView(float w, float h)
                        drawpic(splash_pos, "gfx/blood", splash_size, stov(autocvar_hud_damage_color), bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
        }
 
+       if(spectatee_status >= 0 && !intermission)
+       {
+               if(getstati(STAT_HEALTH) <= 0)
+               {
+                       if(!cvar("chase_active"))
+                               cvar_set("chase_active", "1");
+               }
+               else if(cvar("chase_active"))
+                       cvar_set("chase_active", "0");
+       }
+
        // Draw the mouse cursor
        // NOTE: drawpic must happen after R_RenderScene for some reason
        //drawpic(getmousepos(), "gfx/cursor.tga", '11 14 0', '1 1 1', 1, 0);