{
if(damage > 0)
{
- if(attacker.weapon != WEP_ELECTRO && attacker.weapon != WEP_LASER || ((attacker.weapon == WEP_ELECTRO && autocvar_g_balance_electro_lightning || attacker.weapon == WEP_LASER) && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time))
+ if(attacker.weapon != WEP_LASER
+ && (attacker.weapon != WEP_ELECTRO || !autocvar_g_balance_electro_lightning)
+ && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
{
if(targ.BUTTON_CHAT)
attacker.typehitsound += 1;
}
else
{
- if(deathtype != DEATH_FIRE)
+ if(deathtype != DEATH_FIRE
+ && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+ {
attacker.typehitsound += 1;
+ attacker.prevhitsound = time;
+ }
if(mirrordamage > 0)
if(time > attacker.teamkill_complain)
{
W_Electro_Attack2();
self.electro_count = autocvar_g_balance_electro_secondary_count;
weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_electro_secondary_animtime, w_electro_checkattack);
- self.electro_secondarytime = time + autocvar_g_balance_electro_secondary_refire2;
+ self.electro_secondarytime = time + autocvar_g_balance_electro_secondary_refire2 * W_WeaponRateFactor();
}
}
else if (req == WR_PRECACHE)
vector angle;
angle = v_forward;
+ float meleetime;
+ meleetime = autocvar_g_balance_shotgun_secondary_melee_time * W_WeaponRateFactor();
+
// perform trace
float f;
- f = (self.cnt + autocvar_g_balance_shotgun_secondary_melee_time - time) / autocvar_g_balance_shotgun_secondary_melee_time * 2 - 1;
+ f = (self.cnt + meleetime - time) / meleetime * 2 - 1;
vector targpos;
targpos = self.owner.origin + self.owner.view_ofs + angle * autocvar_g_balance_shotgun_secondary_melee_range + v_right * f * autocvar_g_balance_shotgun_secondary_melee_swing + v_up * f * autocvar_g_balance_shotgun_secondary_melee_swing;
Damage (trace_ent, self.owner, self.owner, autocvar_g_balance_shotgun_secondary_damage * min(1, f + 1), WEP_SHOTGUN | HITTYPE_SECONDARY , self.owner.origin + self.owner.view_ofs, force);
remove(self);
}
- else if(time >= self.cnt + autocvar_g_balance_shotgun_secondary_melee_time) // missed, remove ent
+ else if(time >= self.cnt + meleetime) // missed, remove ent
remove(self);
else // continue swinging the weapon in hope of hitting someone :)
self.nextthink = time;