From d191b6f033c572758d14b9b2772307317e2956cf Mon Sep 17 00:00:00 2001 From: drjaska Date: Sat, 1 Apr 2023 02:42:09 +0300 Subject: [PATCH] q3df rl 1.2x horizontal force in specific context --- qcsrc/server/damage.qc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/qcsrc/server/damage.qc b/qcsrc/server/damage.qc index 661f8f945..4ec6c3f17 100644 --- a/qcsrc/server/damage.qc +++ b/qcsrc/server/damage.qc @@ -707,6 +707,24 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de mirrordamage = M_ARGV(5, float); force = M_ARGV(6, vector); + // Dr. Jaska: + // Quake 3 DeFRaG's cpm physic's rocketlauncher has 1.2x horizontal force multiplier + // This aims to reproduce it in Quake 3 DeFRaG cpm and XDF physics if damagepush_speedfactor is 0 + // CPMA cpm physics should be active in .arena maps and Quake 3 DeFRaG cpm physics in .defi maps + // It is only intended to be used with 250 base force for devastator which matches Q3 if our + // target's damageforcescale is also 2 + if(force) + if(autocvar_g_balance_damagepush_speedfactor == 0) + if(attacker.(weaponentity).m_weapon == WEP_DEVASTATOR) + if(autocvar_g_balance_devastator_force == 250) + if(targ.damageforcescale == 2) + if(q3compat & Q3COMPAT_DEFI) + if((cvar_string("g_mod_physics") == "CPMA") || (cvar_string("g_mod_physics") == "XDF")) + { + force.x *= 1.2; + force.y *= 1.2; + } + if(IS_PLAYER(targ) && damage > 0 && attacker) { for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) -- 2.39.2