X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_damage.qc;h=29fc297d5ef8c92e6dbfe822d6fb4aa37f280102;hb=d74a5ec398a8e1a1e80d1f82a08f35f69724de5f;hp=e1ee5706856c05e98fd49c717c20bb6dee0277eb;hpb=c45067564a27d2d3148775446992db29d8e41e32;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index e1ee57068..29fc297d5 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -494,7 +494,6 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) entity damage_targ; entity damage_inflictor; entity damage_attacker; -.float prevhitsound; void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { @@ -789,15 +788,12 @@ 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(targ.BUTTON_CHAT) attacker.typehitsound += 1; else attacker.hitsound += 1; - attacker.prevhitsound = time; } damage_goodhits += 1; @@ -822,11 +818,9 @@ 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) { attacker.typehitsound += 1; - attacker.prevhitsound = time; } if(mirrordamage > 0) if(time > attacker.teamkill_complain) @@ -845,7 +839,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float if (vlen(force)) if (self.classname != "player" || time >= self.spawnshieldtime || g_midair) { - self.velocity = self.velocity + self.damageforcescale * force; + self.velocity = self.velocity + damage_explosion_calcpush(self.damageforcescale * force, self.velocity, autocvar_g_balance_damagepush_speedfactor); self.flags &~= FL_ONGROUND; UpdateCSQCProjectile(self); }