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 8
+set g_balance_sniperrifle_reload_ammo 40
set g_balance_sniperrifle_reload_time 2
// }}}
// {{{ tuba
for (sc = 0;sc < bullets;sc = sc + 1)
fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, 0, f, WEP_SHOTGUN, 0, 1, bulletconstant);
endFireBallisticBullet();
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- {
- if(!autocvar_g_balance_shotgun_reload_ammo)
- self.ammo_shells -= ammoamount;
- else
- self.shotgun_load -= ammoamount;
- }
pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 1000, autocvar_g_balance_shotgun_primary_ammo);
flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
W_AttachToShotorg(flash, '5 0 0');
- self.ammo_counter = self.ammo_counter - 1;
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ {
+ if(!autocvar_g_balance_shotgun_reload_ammo)
+ self.ammo_shells -= ammoamount;
+ else
+ {
+ self.ammo_counter -= ammoamount;
+ self.shotgun_load = self.ammo_counter;
+ }
+ }
}
void shotgun_meleethink (void)
void W_SniperRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant)
{
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- if(!autocvar_g_balance_sniperrifle_reload_ammo)
- self.ammo_nails -= pAmmo;
-
if(deathtype & HITTYPE_SECONDARY)
W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, "weapons/campingrifle_fire2.wav", CHAN_WEAPON, autocvar_g_balance_sniperrifle_secondary_damage + autocvar_g_balance_sniperrifle_secondary_headshotaddeddamage);
else
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
if(!autocvar_g_balance_sniperrifle_reload_ammo)
- self.ammo_nails -= 1;
+ self.ammo_nails -= pAmmo;
else
- self.sniperrifle_load -= 1;
+ {
+ self.ammo_counter -= pAmmo;
+ self.sniperrifle_load = self.ammo_counter;
+ }
}
}