From 0e42cf58ff9ea3d71ffae95be68431f123ff88bc Mon Sep 17 00:00:00 2001 From: Jakob MG Date: Tue, 21 Jun 2011 15:01:32 +0200 Subject: [PATCH] Stop button2 from beeing zoom if you help a nex or rifle when entering a vehicle --- qcsrc/client/View.qc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 89fcbe1f4..870da0d7b 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -128,6 +128,7 @@ vector GetCurrentFov(float fov) zoomspeed = 3.5; zoomdir = button_zoom; + if(hud == HUD_NORMAL) if((getstati(STAT_ACTIVEWEAPON) == WEP_NEX && nex_scope) || (getstati(STAT_ACTIVEWEAPON) == WEP_RIFLE && rifle_scope)) // do NOT use switchweapon here zoomdir += button_attack2; if(spectatee_status > 0 || isdemo()) @@ -664,12 +665,12 @@ void CSQC_UpdateView(float w, float h) R_PolygonVertex(autocvar_vid_conheight * '0 1 0', tc_01, rgb, a); R_EndPolygon(); } - + // Draw the aiming reticle for weapons that use it // reticle_type is changed to the item we are zooming / aiming with, to decide which reticle to use // It must be a persisted float for fading out to work properly (you let go of the zoom button for // the view to go back to normal, so reticle_type would become 0 as we fade out) - if(spectatee_status || getstati(STAT_HEALTH) <= 0) + if(spectatee_status || getstati(STAT_HEALTH) <= 0 || hud != HUD_NORMAL) reticle_type = 0; // prevent reticle from showing during the respawn zoom effect or for spectators else if(activeweapon == WEP_NEX && (button_zoom || zoomscript_caught) || activeweapon == WEP_RIFLE && (button_zoom || zoomscript_caught) || activeweapon == WEP_MINSTANEX && (button_zoom || zoomscript_caught)) reticle_type = 2; // nex zoom @@ -677,7 +678,7 @@ void CSQC_UpdateView(float w, float h) reticle_type = 1; // normal zoom else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_RIFLE && button_attack2) reticle_type = 2; // nex zoom - + if (reticle_type) { if(autocvar_cl_reticle_stretch) -- 2.39.2