]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't continue the loop if a valid reticle image is chosen, hopefully fixes a bad...
authorMario <mario@smbclan.net>
Wed, 21 Dec 2016 07:43:27 +0000 (17:43 +1000)
committerMario <mario@smbclan.net>
Wed, 21 Dec 2016 07:43:27 +0000 (17:43 +1000)
qcsrc/client/view.qc

index 52591b3fc3ac196e2194a325e29c59d9d3052c40..63a0aef279706cdc7ec78d7c649c30734ee12856 100644 (file)
@@ -1962,8 +1962,11 @@ void CSQC_UpdateView(entity this, float w, float h)
                        if(wep != WEP_Null && wep.wr_zoom)
                        {
                                bool do_zoom = wep.wr_zoom(wep, NULL);
-                               if(wep.w_reticle && wep.w_reticle != "")
+                               if(wep.w_reticle != "")
+                               {
                                        reticle_image = wep.w_reticle;
+                                       break; // we can only draw 1 reticle
+                               }
                                wep_zoomed += do_zoom;
                        }
                }
@@ -1978,7 +1981,7 @@ void CSQC_UpdateView(entity this, float w, float h)
                }
                else if(wep_zoomed && autocvar_cl_reticle_weapon)
                {
-                       if(reticle_image && reticle_image != "") { reticle_type = 2; }
+                       if(reticle_image != "") { reticle_type = 2; }
                        else { reticle_type = 0; }
                }
                else if(button_zoom || zoomscript_caught)