From: drjaska Date: Wed, 28 Dec 2022 13:55:51 +0000 (+0200) Subject: bones' optimization X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=978aabfb3b89149cca1dc549ddf97545bcc27681;p=xonotic%2Fxonotic-data.pk3dir.git bones' optimization --- diff --git a/qcsrc/server/damage.qc b/qcsrc/server/damage.qc index 404a42a89..ea3765f17 100644 --- a/qcsrc/server/damage.qc +++ b/qcsrc/server/damage.qc @@ -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) {