From: drjaska Date: Fri, 31 Mar 2023 23:42:09 +0000 (+0300) Subject: q3df rl 1.2x horizontal force in specific context X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d191b6f033c572758d14b9b2772307317e2956cf;p=xonotic%2Fxonotic-data.pk3dir.git q3df rl 1.2x horizontal force in specific context --- 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)