]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'mirceakitsune/nex_reticle' of ssh://git.xonotic.org/xonotic-data.pk3dir...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 24 Jun 2010 14:20:50 +0000 (17:20 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 24 Jun 2010 14:20:50 +0000 (17:20 +0300)
qcsrc/client/View.qc

index 2667c29a9afac15ed36eecc63325f572b03ab781..ca0ffb5616badf71ef986ad0af2c6c4ec048110e 100644 (file)
@@ -552,13 +552,14 @@ 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)
-       reticle_pos_x = 0;
-       reticle_pos_y = 0;
-       reticle_size_x = vid_conwidth;
-       reticle_size_y = vid_conheight;
+       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;
+       reticle_pos_y = (vid_conheight - reticle_size_y) / 2;
 
+       precache_pic("textures/reticle_nex");
        if(cvar("cl_reticle_nex"))
-       if(button_attack2 && activeweapon == WEP_NEX)
+       if(activeweapon == WEP_NEX && current_zoomfraction)
                drawpic(reticle_pos, "textures/reticle_nex", reticle_size, '1 1 1', current_zoomfraction * cvar("cl_reticle_nex"), DRAWFLAG_NORMAL);
 
        // Draw the mouse cursor