]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Added cvar bot_debug_goalstack to visualize the path that each bot is trying to follow
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index 68be349714138d5f6f865ac5d53494fd820fc1b1..29fc297d5ef8c92e6dbfe822d6fb4aa37f280102 100644 (file)
@@ -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)
 {
@@ -790,13 +789,11 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                        if(damage > 0)
                                        {
                                                if(deathtype != DEATH_FIRE)
-                                               if(attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
                                                {
                                                        if(targ.BUTTON_CHAT)
                                                                attacker.typehitsound += 1;
                                                        else
                                                                attacker.hitsound += 1;
-                                                       attacker.prevhitsound = time;
                                                }
 
                                                damage_goodhits += 1;
@@ -822,10 +819,8 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                else
                                {
                                        if(deathtype != DEATH_FIRE)
-                                       if(attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
                                        {
                                                attacker.typehitsound += 1;
-                                               attacker.prevhitsound = time;
                                        }
                                        if(mirrordamage > 0)
                                                if(time > attacker.teamkill_complain)
@@ -844,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);
        }