]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
bones' optimization
authordrjaska <drjaska83@gmail.com>
Wed, 28 Dec 2022 13:55:51 +0000 (15:55 +0200)
committerdrjaska <drjaska83@gmail.com>
Wed, 28 Dec 2022 13:55:51 +0000 (15:55 +0200)
qcsrc/server/damage.qc

index 404a42a894b86cb83483a4d2142e92e132d95c28..ea3765f17d99f73f05062331733036d96688ca1d 100644 (file)
@@ -829,8 +829,9 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de
        if (force)
        if (!IS_PLAYER(targ) || !StatusEffects_active(STATUSEFFECT_SpawnShield, targ) || targ == attacker)
        {
-               vector farce = damage_explosion_calcpush(targ.damageforcescale * force, targ.velocity,
-                               attacker == targ ? autocvar_g_balance_damagepush_speedfactor : 0);
+               vector farce = targ.damageforcescale * force;
+               if (attacker == targ && autocvar_g_balance_damagepush_speedfactor)
+                       farce = damage_explosion_calcpush(farce, targ.velocity, autocvar_g_balance_damagepush_speedfactor);
 
                if(targ.move_movetype == MOVETYPE_PHYSICS)
                {