From: Mircea Kitsune Date: Tue, 15 Jun 2010 16:25:11 +0000 (+0300) Subject: Initial commit. Draws a full screen reticle for the Nex's alt fire (zoom). Meant... X-Git-Tag: xonotic-v0.1.0preview~501^2~1^2~27 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9c4265571d010208227f1c163f6a01f343257077;p=xonotic%2Fxonotic-data.pk3dir.git Initial commit. Draws a full screen reticle for the Nex's alt fire (zoom). Meant to support this feature for other weapons that might use it in the future. Client sided and enabled by default for the Nex. Does not affect the normal zoom. --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 725510d95..600a4a4e9 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -206,6 +206,7 @@ seta crosshair_fireball_color_green 1.0 "crosshair color green component to disp seta crosshair_fireball_color_blue 0.2 "crosshair color blue component to display when wielding the fireball" seta crosshair_fireball_color_alpha 1 "crosshair alpha value to display when wielding the fireball" seta crosshair_fireball_size 1 "crosshair size when wielding the fireball" +seta cl_recticle_nex 1 "draw aiming recticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha" fov 90 seta cl_velocityzoom 0 "velocity based zooming of fov, negative values zoom out" seta cl_velocityzoomtime 0.3 "time value for averaging speed values" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 0557db116..819fa4d24 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -355,6 +355,7 @@ void CSQC_UpdateView(float w, float h) float fov; float f, i, j; vector v, vo; + vector recticle_pos, recticle_size; WaypointSprite_Load(); @@ -828,6 +829,16 @@ void CSQC_UpdateView(float w, float h) wcross_resolution_goal_prev = 0; wcross_resolution_goal_prev_prev = 0; } + + // draw the aiming reticle for weapons that use zoom for alt fire (eg. nex) + recticle_pos_x = 0; + recticle_pos_y = 0; + recticle_size_x = vid_conwidth; + recticle_size_y = vid_conheight; + + if(cvar("cl_recticle_nex")) + if(button_attack2 && activeweapon == WEP_NEX) + drawpic(recticle_pos, "textures/reticle_nex", recticle_size, '1 1 1', cvar("cl_recticle_nex"), DRAWFLAG_NORMAL); } if(NextFrameCommand)