From: Mario <mario.mario@y7mail.com>
Date: Thu, 2 Jan 2025 06:40:02 +0000 (+1000)
Subject: Give the zoom reticle a minimum opacity from zooming to make it always visible
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0559aa04a5c7d824b268331f78b8a7ed9ddff2f0;p=xonotic%2Fxonotic-data.pk3dir.git

Give the zoom reticle a minimum opacity from zooming to make it always visible
---

diff --git a/qcsrc/client/hud/crosshair.qc b/qcsrc/client/hud/crosshair.qc
index 39d5686962..1d2bc6085b 100644
--- a/qcsrc/client/hud/crosshair.qc
+++ b/qcsrc/client/hud/crosshair.qc
@@ -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)
 		{