]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/View.qc
Respawn screen flash
[voretournament/voretournament.git] / data / qcsrc / client / View.qc
index 523538a551271242419a4ae944d7e561769c62b2..bf89e9a4257dfd24a8333f995bbf25ea87e49747 100644 (file)
@@ -253,7 +253,7 @@ float camera_mode;
 float reticle_type;\r
 float chase_active_old;\r
 float artwork_fade;\r
 float reticle_type;\r
 float chase_active_old;\r
 float artwork_fade;\r
-float pickup_crosshair_time, pickup_crosshair_size, pickup_flash_time, vore_flash_laststate;\r
+float pickup_crosshair_time, pickup_crosshair_size, pickup_flash_time, vore_flash_laststate, respawn_flash_lasthealth;\r
 float myhealth, myhealth_prev, myhealth_flash;\r
 float contentavgalpha, liquidalpha_prev;\r
 float old_blurradius, old_bluralpha, old_sharpen_intensity;\r
 float myhealth, myhealth_prev, myhealth_flash;\r
 float contentavgalpha, liquidalpha_prev;\r
 float old_blurradius, old_bluralpha, old_sharpen_intensity;\r
@@ -1054,6 +1054,16 @@ void CSQC_UpdateView(float w, float h)
 \r
                vore_flash_laststate = vore_flash_state;\r
        }\r
 \r
                vore_flash_laststate = vore_flash_state;\r
        }\r
+       if(cvar("cl_flash_respawn"))\r
+       {\r
+               float respawn_flash_health;\r
+               respawn_flash_health = getstati(STAT_HEALTH);\r
+\r
+               if(respawn_flash_lasthealth <= 0 && respawn_flash_health > 0)\r
+                       localcmd(strcat("bf ", cvar_string("cl_flash_respawn_color"), " ", cvar_string("cl_flash_respawn"), "\n"));\r
+\r
+               respawn_flash_lasthealth = respawn_flash_health;\r
+       }\r
 \r
        if not(getstati(STAT_VORE_EATEN)) // crosshair is useless if we're in the stomach\r
        {\r
 \r
        if not(getstati(STAT_VORE_EATEN)) // crosshair is useless if we're in the stomach\r
        {\r