From: Mircea Kitsune Date: Thu, 24 Jun 2010 14:51:28 +0000 (+0300) Subject: Add code to separate between zoom types (currently between normal zoom and Nex zoom). X-Git-Tag: xonotic-v0.1.0preview~501^2~1^2~15 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=0f0ebd679dc10ff35b8fe5877d6eae984db4e78b Add code to separate between zoom types (currently between normal zoom and Nex zoom). --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 0f76b60c2e..3a13376051 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -552,6 +552,13 @@ void CSQC_UpdateView(float w, float h) drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0); // draw the aiming reticle for weapons that use it (eg. Nex) + // zoom_type is changed to the item we are zooming with, to decide which reticle to use + float zoom_type; + if(button_zoom) + zoom_type = 0; // normal zoom + else if(activeweapon == WEP_NEX && button_attack2) + zoom_type = 1; // nex zoom + reticle_size_x = max(vid_conwidth, vid_conheight); reticle_size_y = max(vid_conwidth, vid_conheight); reticle_pos_x = (vid_conwidth - reticle_size_x) / 2; @@ -559,7 +566,7 @@ void CSQC_UpdateView(float w, float h) precache_pic("textures/reticle_nex"); if(cvar("cl_reticle_nex")) - if(activeweapon == WEP_NEX && button_attack2) + if(zoom_type == 1) drawpic(reticle_pos, "textures/reticle_nex", reticle_size, '1 1 1', current_zoomfraction * cvar("cl_reticle_nex"), DRAWFLAG_NORMAL); // Draw the mouse cursor