- a = autocvar_crosshair_ring_nex_inner_alpha;
- rgb = eX * autocvar_crosshair_ring_nex_inner_color_red + eY * autocvar_crosshair_ring_nex_inner_color_green + eZ * autocvar_crosshair_ring_nex_inner_color_blue;
- DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", nex_chargepool, rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+ // handle the values
+ if (activeweapon == WEP_NEX && nex_charge && autocvar_crosshair_ring_nex) // ring around crosshair representing velocity-dependent damage for the nex
+ {
+ if (nex_chargepool || use_nex_chargepool) {
+ use_nex_chargepool = 1;
+ ring_inner_value = nex_chargepool;
+ } else {
+ nex_charge_movingavg = (1 - autocvar_crosshair_ring_nex_currentcharge_movingavg_rate) * nex_charge_movingavg + autocvar_crosshair_ring_nex_currentcharge_movingavg_rate * nex_charge;
+ ring_inner_value = bound(0, autocvar_crosshair_ring_nex_currentcharge_scale * (nex_charge - nex_charge_movingavg), 1);
+ }
+
+ ring_inner_alpha = wcross_alpha * autocvar_crosshair_ring_nex_inner_alpha;
+ ring_inner_image = "gfx/crosshair_ring_inner.tga";
+ ring_inner_rgb = eX * autocvar_crosshair_ring_nex_inner_color_red + eY * autocvar_crosshair_ring_nex_inner_color_green + eZ * autocvar_crosshair_ring_nex_inner_color_blue;
+
+ // draw the outer ring to show the current charge of the weapon
+ ring_value = nex_charge;
+ ring_alpha = wcross_alpha * autocvar_crosshair_ring_nex_alpha;
+ ring_rgb = wcross_color;
+ ring_image = "gfx/crosshair_ring_nexgun.tga";