From dbce89f145facdc540a791d59cf3ed17461841b5 Mon Sep 17 00:00:00 2001 From: drjaska Date: Wed, 28 Dec 2022 14:17:09 +0200 Subject: [PATCH] ternary to remove a variable --- qcsrc/server/damage.qc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qcsrc/server/damage.qc b/qcsrc/server/damage.qc index 61fcb6f6d..404a42a89 100644 --- a/qcsrc/server/damage.qc +++ b/qcsrc/server/damage.qc @@ -829,11 +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) { - float dp_sf = 0; - if (attacker == targ) // only apply dp_sf to self-force - dp_sf = autocvar_g_balance_damagepush_speedfactor; + vector farce = damage_explosion_calcpush(targ.damageforcescale * force, targ.velocity, + attacker == targ ? autocvar_g_balance_damagepush_speedfactor : 0); - vector farce = damage_explosion_calcpush(targ.damageforcescale * force, targ.velocity, dp_sf); if(targ.move_movetype == MOVETYPE_PHYSICS) { entity farcent = new(farce); -- 2.39.2