set g_balance_sniperrifle_secondary_bulletconstant 110 // 15.5qu
set g_balance_sniperrifle_secondary_burstcost 0
set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot
-set g_balance_sniperrifle_reload_ammo 40
+set g_balance_sniperrifle_reload_ammo 60
set g_balance_sniperrifle_reload_time 2
// }}}
// {{{ tuba
float sniperrifle_scope;
float nex_scope;
-float cr_maxbullets;
-
float bgmtime;
string weaponorder_byimpulse;
serverflags = ReadByte();
- cr_maxbullets = ReadByte();
-
g_trueaim_minrange = ReadCoord();
if(!postinit)
// TrueAim check
float shottype;
- float bullets, ring_scale;
+ float bullets, bullets_max, 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;
nex_charge_movingavg = nex_charge;
// ring around crosshair representing bullets left in camping rifle clip
- if (cr_maxbullets)
+ bullets = getstati(STAT_BULLETS_LOADED);
+ if (bullets)
{
- bullets = getstati(STAT_BULLETS_LOADED);
- f = bound(0, bullets / cr_maxbullets, 1);
+ bullets_max = getstati(STAT_BULLETS_MAX);
+ f = bound(0, bullets / bullets_max, 1);
a = autocvar_crosshair_ring_sniperrifle_alpha;
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
const float TE_CSQC_NOTIFY = 112;
const float TE_CSQC_WEAPONCOMPLAIN = 113;
const float TE_CSQC_NEX_SCOPE = 116;
-const float TE_CSQC_CR_MAXBULLETS = 117;
const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
const float RACE_NET_CHECKPOINT_CLEAR = 1;
const float STAT_SHOTORG = 46; // compressShotOrigin
const float STAT_LEADLIMIT = 47;
const float STAT_BULLETS_LOADED = 48;
-const float STAT_NEX_CHARGE = 49;
-const float STAT_LAST_PICKUP = 50;
-const float STAT_HUD = 51;
-const float STAT_NEX_CHARGEPOOL = 52;
+const float STAT_BULLETS_MAX = 49;
+const float STAT_NEX_CHARGE = 50;
+const float STAT_LAST_PICKUP = 51;
+const float STAT_HUD = 52;
+const float STAT_NEX_CHARGEPOOL = 53;
// see DP source, quakedef.h
const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
WriteByte(MSG_ENTITY, autocvar_g_balance_nex_secondary); // client has to know if it should zoom or not
WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_secondary); // client has to know if it should zoom or not
WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
- WriteByte(MSG_ENTITY, 8); // rifle max bullets // TO BE FIXED WITH NEW STAT!
WriteCoord(MSG_ENTITY, autocvar_g_trueaim_minrange);
return TRUE;
}
.float ammo_counter;
.float old_ammo_counter;
+.float ammo_max;
.float wish_reload;
#define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
addstat(STAT_BULLETS_LOADED, AS_INT, ammo_counter);
+ addstat(STAT_BULLETS_MAX, AS_INT, ammo_max);
addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
if(!autocvar_g_balance_shotgun_reload_ammo)
self.ammo_counter = 0; // also keeps crosshair ammo from displaying
else
+ {
self.ammo_counter = self.shotgun_load;
+ self.ammo_max = autocvar_g_balance_shotgun_reload_ammo; // for the crosshair ammo display
+ }
}
void W_Shotgun_ReloadedAndReady()
if(!autocvar_g_balance_sniperrifle_reload_ammo)
self.ammo_counter = 0; // also keeps crosshair ammo from displaying
else
+ {
self.ammo_counter = self.sniperrifle_load;
+ self.ammo_max = autocvar_g_balance_sniperrifle_reload_ammo; // for the crosshair ammo display
+ }
}
void W_SniperRifle_ReloadedAndReady()