]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/View.qc
A few fixes and some new effects
[voretournament/voretournament.git] / data / qcsrc / client / View.qc
index 94e8f4cbe2cd40d0d9119bdabe52a1aee9bb08d6..bd47712070c7091674e5f565b9da4397e1617d6b 100644 (file)
@@ -248,7 +248,7 @@ float camera_mode;
 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, grab_flash_laststate;\r
 float spawnfov_current;\r
 float myhealth, myhealth_prev, myhealth_flash;\r
 float contentavgalpha, liquidalpha_prev;\r
@@ -1191,6 +1191,15 @@ void CSQC_UpdateView(float w, float h)
                        // always update the last vore state, or the flash can be triggered when switching spectated players one frame after\r
                        vore_flash_laststate = vore_flash_state;\r
                }\r
+               if(cvar("cl_flash_grab"))\r
+               {\r
+                       float grab_flash_state = getstatf(STAT_VORE_PROGRESS_PREY) > 0;\r
+                       if(grab_flash_state > grab_flash_laststate)\r
+                               localcmd(strcat("bf ", cvar_string("cl_flash_grab_color"), " ", cvar_string("cl_flash_grab"), "\n"));\r
+\r
+                       // always update the last grab state, or the flash can be triggered when switching spectated players one frame after\r
+                       grab_flash_laststate = grab_flash_state;\r
+               }\r
                if(cvar("cl_flash_respawn"))\r
                if(respawned)\r
                        localcmd(strcat("bf ", cvar_string("cl_flash_respawn_color"), " ", cvar_string("cl_flash_respawn"), "\n"));\r