]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add checks to see if crosshair ring is even allowed to render
authorSamual <samual@xonotic.org>
Sun, 10 Apr 2011 20:50:52 +0000 (16:50 -0400)
committerSamual <samual@xonotic.org>
Sun, 10 Apr 2011 20:50:52 +0000 (16:50 -0400)
qcsrc/client/View.qc

index 09ec96eabaaa9ece2608496c64c551d646d1b695..7f1c6dafb75a3dfcd7fc584ee205a8c41b758cc1 100644 (file)
@@ -1096,7 +1096,7 @@ void CSQC_UpdateView(float w, float h)
                                        
 
                                // handle the values
-                               if (activeweapon == WEP_NEX && nex_charge && autocvar_crosshair_ring_nex) // ring around crosshair representing velocity-dependent damage for the nex
+                               if (autocvar_crosshair_ring && activeweapon == WEP_NEX && nex_charge && autocvar_crosshair_ring_nex) // ring around crosshair representing velocity-dependent damage for the nex
                                {
                                        if (nex_chargepool || use_nex_chargepool) { 
                                                use_nex_chargepool = 1; 
@@ -1116,7 +1116,7 @@ void CSQC_UpdateView(float w, float h)
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring_nexgun.tga";
                                }
-                               else if (activeweapon == WEP_MINE_LAYER && minelayer_maxmines && autocvar_crosshair_ring_minelayer) 
+                               else if (autocvar_crosshair_ring && activeweapon == WEP_MINE_LAYER && minelayer_maxmines && autocvar_crosshair_ring_minelayer) 
                                {
                                        ring_value = bound(0, getstati(STAT_LAYED_MINES) / minelayer_maxmines, 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
                                        ring_alpha = autocvar_crosshair_ring_minelayer_alpha;