]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix possibility of blur getting stuck on when it's not the case to apply it (eg:...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 1 Mar 2011 13:29:48 +0000 (15:29 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 1 Mar 2011 13:29:48 +0000 (15:29 +0200)
qcsrc/client/View.qc

index 9299d98efd507ed47334b08c433aec218be1ecbb..7faad6d3b74490829cc534167be732d5b9d82158 100644 (file)
@@ -731,7 +731,7 @@ void CSQC_UpdateView(float w, float h)
 
                if(autocvar_hud_postprocessing)
                {
-                       if(autocvar_hud_contents_blur)
+                       if(autocvar_hud_contents_blur && contentavgalpha)
                        {
                                content_blurpostprocess_x = 1;
                                content_blurpostprocess_y = contentavgalpha * autocvar_hud_contents_blur;
@@ -808,7 +808,7 @@ void CSQC_UpdateView(float w, float h)
 
                if(autocvar_hud_postprocessing)
                {
-                       if(autocvar_hud_damage_blur)
+                       if(autocvar_hud_damage_blur && myhealth_flash_temp)
                        {
                                damage_blurpostprocess_x = 1;
                                damage_blurpostprocess_y = bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage_blur;
@@ -819,7 +819,7 @@ void CSQC_UpdateView(float w, float h)
                                damage_blurpostprocess_x = 0;
                                damage_blurpostprocess_y = 0;
                                damage_blurpostprocess_z = 0;
-                       }
+                       }                                                                                                                                               dprint(strcat(ftos(myhealth_flash_temp), "----------\n"));
                }
        }