]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Give the zoom reticle a minimum opacity from zooming to make it always visible 1413/head
authorMario <mario.mario@y7mail.com>
Thu, 2 Jan 2025 06:40:02 +0000 (16:40 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 2 Jan 2025 06:40:02 +0000 (16:40 +1000)
qcsrc/client/hud/crosshair.qc

index 39d56869627371de41116502f5e98f3f07cf2877..1d2bc6085bb5e825a6f4140f5cd793026cf51965 100644 (file)
@@ -19,8 +19,6 @@ float pickup_crosshair_time, pickup_crosshair_size;
 float hitindication_crosshair_size;
 float use_vortex_chargepool;
 
-float reticle_type;
-
 vector wcross_origin;
 float wcross_scale_prev, wcross_alpha_prev;
 vector wcross_color_prev;
@@ -677,11 +675,9 @@ void HUD_Crosshair(entity this)
 void DrawReticle(entity this)
 {
        if(!autocvar_cl_reticle || MUTATOR_CALLHOOK(DrawReticle))
-       {
-               reticle_type = 0;
                return;
-       }
 
+       int reticle_type = 0;
        float is_dead = (STAT(HEALTH) <= 0);
        string reticle_image = string_null;
        bool wep_zoomed = false;
@@ -735,7 +731,7 @@ void DrawReticle(entity this)
                        reticle_pos.y = (vid_conheight - reticle_size.y) / 2;
                }
 
-               float f = (zoomscript_caught) ? 1 : current_zoomfraction;
+               float f = (zoomscript_caught) ? 1 : max(0.25, current_zoomfraction);
 
                if(f)
                {