seta crosshair_ring_size 2 "bullet counter ring size for Rifle, velocity ring for Nex"
seta crosshair_campingrifle_bulletcounter_alpha 0.15
seta crosshair_nexvelocity_alpha 0.15
+seta crosshair_nexvelocity_scale 30
+seta crosshair_nexvelocity_currentcharge_rate 0.05
+seta crosshair_nexvelocity_currentcharge_alpha 0.15
+seta crosshair_nexvelocity_currentcharge_color_red 0.8
+seta crosshair_nexvelocity_currentcharge_color_green 0
+seta crosshair_nexvelocity_currentcharge_color_blue 0
seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)"
seta cl_reticle_item_nex 1 "draw aiming recticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha"
seta cl_reticle_item_normal 1 "draw recticle when zooming with the zoom button, 0 disables and values between 0 and 1 change alpha"
entity nightvision_noise, nightvision_noise2;
float pickup_crosshair_time, pickup_crosshair_size;
+float nex_charge_change, nex_charge_current_avg;
void CSQC_UpdateView(float w, float h)
{
}
else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
{
+ vector rgb;
+ // indicate how much we're charging right now with an inner circle
+ a = cvar("crosshair_nexvelocity_currentcharge_alpha");
+ nex_charge_change = (1 - cvar("crosshair_nexvelocity_currentcharge_rate")) * nex_charge_change + cvar("crosshair_nexvelocity_currentcharge_rate") * nex_charge;
+ nex_charge_current_avg = cvar("crosshair_nexvelocity_currentcharge_rate") * nex_charge_current_avg + (1 - cvar("crosshair_nexvelocity_currentcharge_rate")) * nex_charge_change;
+
+ rgb = eX * cvar("crosshair_nexvelocity_currentcharge_color_red") + eY * cvar("crosshair_nexvelocity_currentcharge_color_green") + eZ * cvar("crosshair_nexvelocity_currentcharge_color_blue");
+ DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_nexvelocity_scale") * (nex_charge - nex_charge_current_avg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+
+ // draw the charge
a = cvar("crosshair_nexvelocity_alpha");
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", nex_charge, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
}