From: Mario 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=refs%2Fmerge-requests%2F1413%2Fhead;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 39d568696..1d2bc6085 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) {