// TrueAim check
float shottype;
+
+ float weapon_clipload, weapon_clipsize, ring_scale;
+
// wcross_origin = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
wcross_origin = project_3d_to_2d(view_origin + MAX_SHOT_DISTANCE * view_forward);
wcross_origin_z = 0;
if(nex_charge_movingavg == 0) // this should only happen if we have just loaded up the game
nex_charge_movingavg = nex_charge;
-
- if (activeweapon == WEP_SNIPERRIFLE && cr_maxbullets && autocvar_crosshair_ring_sniperrifle) // ring around crosshair representing bullets left in camping rifle clip
- {
- ring_value = bound(0, getstati(STAT_BULLETS_LOADED) / cr_maxbullets, 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
- ring_alpha = wcross_alpha * autocvar_crosshair_ring_sniperrifle_alpha;
- ring_image = "gfx/crosshair_ring_sniperrifle.tga";
+
+ 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