ALWAYS do hitsound antispam. No need for that weapon check craziness.
authorRudolf Polzer <divverent@alientrap.org>
Sun, 13 Feb 2011 20:38:46 +0000 (21:38 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 13 Feb 2011 20:38:46 +0000 (21:38 +0100)
qcsrc/server/g_damage.qc

index e1ee570..68be349 100644 (file)
@@ -789,9 +789,8 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                {
                                        if(damage > 0)
                                        {
-                                               if(attacker.weapon != WEP_LASER
-                                               && (attacker.weapon != WEP_ELECTRO || !autocvar_g_balance_electro_lightning)
-                                               && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+                                               if(deathtype != DEATH_FIRE)
+                                               if(attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
                                                {
                                                        if(targ.BUTTON_CHAT)
                                                                attacker.typehitsound += 1;
@@ -822,8 +821,8 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                }
                                else
                                {
-                                       if(deathtype != DEATH_FIRE
-                                       && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+                                       if(deathtype != DEATH_FIRE)
+                                       if(attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
                                        {
                                                attacker.typehitsound += 1;
                                                attacker.prevhitsound = time;