seta crosshair_color_by_health 0 "if enabled, crosshair color will depend on current health"
// ring around crosshair, used for various purposes (such as indicating bullets left in clip, nex charge)
-seta crosshair_ring 1 "main cvar to enable or disable crosshair rings"
+seta crosshair_ring 1 "main cvar to enable or disable normal crosshair rings"
seta crosshair_ring_inner 0 "allow inner rings to be drawn too"
-seta crosshair_ring_size 2 "bullet counter ring size for Rifle, velocity ring for Nex"
+seta crosshair_ring_size 2 "ring size"
seta crosshair_ring_alpha 0.2 "ring alpha"
-seta crosshair_ring_sniperrifle 1 "draw a ring showing the ammount of ammo left in the sniperrifle
-seta crosshair_ring_sniperrifle_alpha 0.15
-
seta crosshair_ring_nex 1 "draw a ring showing the current charge of the nexgun"
seta crosshair_ring_nex_alpha 0.15
seta crosshair_ring_nex_inner_alpha 0.15
seta crosshair_ring_minelayer 1
seta crosshair_ring_minelayer_alpha 0.15
+seta crosshair_ring_reload 1 "main cvar to enable or disable ammo crosshair rings"
+seta crosshair_ring_reload_size 2 "reload ring size"
+seta crosshair_ring_reload_alpha 0.2 "reload ring alpha"
+
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 reticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha"
seta cl_reticle_item_normal 1 "draw reticle when zooming with the zoom button, 0 disables and values between 0 and 1 change alpha"
wcross_alpha *= 1 - autocvar__menu_alpha;
wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
+ float ring_value, ring_scale, ring_alpha, ring_inner_value, ring_inner_alpha;
+ string ring_image, ring_inner_image;
+ vector ring_rgb, ring_inner_rgb;
+
+ // normal crosshair ring
if (autocvar_crosshair_ring)
{
- float ring_value, ring_alpha, ring_inner_value, ring_inner_alpha;
- string ring_image, ring_inner_image;
- vector ring_rgb, ring_inner_rgb;
-
- float ring_scale = autocvar_crosshair_ring_size;
-
+ ring_scale = autocvar_crosshair_ring_size;
+
float nex_charge, nex_chargepool;
nex_charge = getstatf(STAT_NEX_CHARGE);
nex_chargepool = getstatf(STAT_NEX_CHARGEPOOL);
-
+
if(nex_charge_movingavg == 0) // this should only happen if we have just loaded up the game
nex_charge_movingavg = nex_charge;
- weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);
- if (weapon_clipload) // ring around crosshair representing ammo left in weapon clip
- {
- weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);
- ring_value = bound(0, weapon_clipload / weapon_clipsize, 1);
- ring_alpha = autocvar_crosshair_ring_sniperrifle_alpha;
- ring_image = "gfx/crosshair_ring.tga";
- ring_rgb = wcross_color;
- }
- else if (activeweapon == WEP_NEX && nex_charge && autocvar_crosshair_ring_nex) // ring around crosshair representing velocity-dependent damage for the nex
+ 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_image = "gfx/crosshair_ring.tga";
ring_rgb = wcross_color;
}
-
+
if (autocvar_crosshair_ring_inner && ring_inner_value) // lets draw a ring inside a ring so you can ring while you ring
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, ring_inner_image, ring_inner_value, ring_inner_rgb, ring_inner_alpha, DRAWFLAG_ADDITIVE);
-
+
if (ring_value)
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, ring_image, ring_value, ring_rgb, ring_alpha, DRAWFLAG_ADDITIVE);
}
+ // ammo crosshair ring
+ if(autocvar_crosshair_ring_reload)
+ {
+ weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);
+ if (weapon_clipload) // ring around crosshair representing ammo left in the weapon clip
+ {
+ weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);
+ ring_value = bound(0, weapon_clipload / weapon_clipsize, 1);
+ ring_scale = autocvar_crosshair_ring_reload_size;
+ ring_alpha = autocvar_crosshair_ring_reload_alpha;
+ ring_image = "gfx/crosshair_ring.tga";
+ ring_rgb = wcross_color;
+
+ DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, ring_image, ring_value, ring_rgb, ring_alpha, DRAWFLAG_ADDITIVE);
+ }
+ }
+
#define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
do \
{ \