vector forward, right, up;
float maxdmg;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < autocvar_g_balance_crylink_primary_ammo)
+ {
+ W_Crylink_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
local entity proj, prevproj, firstproj;
float maxdmg;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < autocvar_g_balance_crylink_secondary_ammo)
+ {
+ W_Crylink_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
{
local entity proj;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_electro_reload_ammo && self.clip_load < autocvar_g_balance_electro_primary_ammo)
+ {
+ W_Electro_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
{
local entity proj;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_electro_reload_ammo && self.clip_load < autocvar_g_balance_electro_secondary_ammo)
+ {
+ W_Electro_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
void W_Fireball_Attack1_Frame0()
{
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_fireball_reload_ammo && self.clip_load < autocvar_g_balance_fireball_primary_ammo)
+ {
+ W_Fireball_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
vector f_diff;
float c;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_fireball_reload_ammo && self.clip_load < autocvar_g_balance_fireball_secondary_ammo)
+ {
+ W_Fireball_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
{
local entity gren;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_grenadelauncher_reload_ammo && self.clip_load < autocvar_g_balance_grenadelauncher_primary_ammo)
+ {
+ W_GrenadeLauncher_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
{
local entity gren;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_grenadelauncher_reload_ammo && self.clip_load < autocvar_g_balance_grenadelauncher_secondary_ammo)
+ {
+ W_GrenadeLauncher_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
local entity missile;
float spread;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_hlac_reload_ammo && self.clip_load < autocvar_g_balance_hlac_primary_ammo)
+ {
+ W_HLAC_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
{
float i;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_hlac_reload_ammo && self.clip_load < autocvar_g_balance_hlac_secondary_ammo)
+ {
+ W_HLAC_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
}
}
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_minelayer_reload_ammo && self.clip_load < autocvar_g_balance_minelayer_ammo)
+ {
+ W_MineLayer_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
float bulletconstant;
local entity flash;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_shotgun_reload_ammo && self.clip_load < autocvar_g_balance_shotgun_primary_ammo)
+ {
+ W_Shotgun_Reload();
+ return;
+ }
+
ammoamount = autocvar_g_balance_shotgun_primary_ammo;
bullets = autocvar_g_balance_shotgun_primary_bullets;
d = autocvar_g_balance_shotgun_primary_damage;
void W_SniperRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant)
{
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_sniperrifle_reload_ammo && self.clip_load < autocvar_g_balance_sniperrifle_primary_ammo)
+ {
+ W_SniperRifle_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
{
float uzi_spread;
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_uzi_reload_ammo && self.clip_load < max(autocvar_g_balance_uzi_sustained_ammo, autocvar_g_balance_uzi_first_ammo))
+ {
+ W_UZI_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
return FALSE;
}
+ // if there's not enough ammo for this attack (but we still have the weapon), reload
+ if(autocvar_g_balance_uzi_reload_ammo && self.clip_load < autocvar_g_balance_uzi_burst_ammo)
+ {
+ W_UZI_Reload();
+ return;
+ }
+
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{