- // ring around crosshair representing bullets left in camping rifle clip
- if (activeweapon == WEP_CAMPINGRIFLE)
- {
- ring_scale = cvar("crosshair_campingrifle_ring_size");
- bullets = bound(0, getstati(STAT_BULLETS_LOADED), 4);
- }
- else
- bullets = 0;
+ wcross_scale *= 1 - cvar("_menu_alpha");
+ wcross_alpha *= 1 - cvar("_menu_alpha");
+
+ ring_scale = cvar("crosshair_ring_size");
+
+ wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
+
+ float nex_charge;
+ nex_charge = getstatf(STAT_NEX_CHARGE);
+
+ if(nex_charge_movingavg == 0) // this should only happen if we have just loaded up the game
+ nex_charge_movingavg = nex_charge;
+
+ // ring around crosshair representing bullets left in camping rifle clip
+ if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
+ {
+ bullets = getstati(STAT_BULLETS_LOADED);
+ f = bound(0, bullets / cr_maxbullets, 1);
+
+ a = cvar("crosshair_campingrifle_bulletcounter_alpha");
+ DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+ }
+ 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_movingavg = (1 - cvar("crosshair_nexvelocity_currentcharge_movingavg_rate")) * nex_charge_movingavg + cvar("crosshair_nexvelocity_currentcharge_movingavg_rate") * nex_charge;
+
+ 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_currentcharge_scale") * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);