From d3ba249d9480389faaae56a138271208287bb327 Mon Sep 17 00:00:00 2001 From: Martin Taibr Date: Mon, 5 Feb 2018 03:14:11 +0100 Subject: [PATCH] make shield reduce force as well (unless selfpush) --- balance-mario.cfg | 1 + balance-nexuiz25.cfg | 1 + balance-overkill.cfg | 1 + balance-samual.cfg | 1 + balance-xdf.cfg | 1 + balance-xonotic.cfg | 1 + balance-xpm.cfg | 1 + qcsrc/server/autocvars.qh | 1 + qcsrc/server/g_damage.qc | 6 ++++++ 9 files changed, 14 insertions(+) diff --git a/balance-mario.cfg b/balance-mario.cfg index 28100182e..830270043 100644 --- a/balance-mario.cfg +++ b/balance-mario.cfg @@ -198,6 +198,7 @@ set g_maxpushtime 8.0 "timeout for kill credit when your damage knocks someone i // {{{ powerups set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken +set g_balance_powerup_invincible_takeforce 1 set g_balance_powerup_invincible_time 30 set g_balance_powerup_strength_damage 3 set g_balance_powerup_strength_force 3 diff --git a/balance-nexuiz25.cfg b/balance-nexuiz25.cfg index 37099c122..f11edbfa8 100644 --- a/balance-nexuiz25.cfg +++ b/balance-nexuiz25.cfg @@ -198,6 +198,7 @@ set g_maxpushtime 8.0 "timeout for kill credit when your damage knocks someone i // {{{ powerups set g_balance_powerup_invincible_takedamage 0.2 +set g_balance_powerup_invincible_takeforce 1 set g_balance_powerup_invincible_time 30 set g_balance_powerup_strength_damage 3 set g_balance_powerup_strength_force 4 diff --git a/balance-overkill.cfg b/balance-overkill.cfg index 3a321ce53..cb15afb2f 100644 --- a/balance-overkill.cfg +++ b/balance-overkill.cfg @@ -198,6 +198,7 @@ set g_maxpushtime 8.0 "timeout for kill credit when your damage knocks someone i // {{{ powerups set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken +set g_balance_powerup_invincible_takeforce 0.33 set g_balance_powerup_invincible_time 30 set g_balance_powerup_strength_damage 3 set g_balance_powerup_strength_force 3 diff --git a/balance-samual.cfg b/balance-samual.cfg index 48c68d81b..d5ba21361 100644 --- a/balance-samual.cfg +++ b/balance-samual.cfg @@ -198,6 +198,7 @@ set g_maxpushtime 8.0 "timeout for kill credit when your damage knocks someone i // {{{ powerups set g_balance_powerup_invincible_takedamage 0.25 // only 1/4th damage is taken +set g_balance_powerup_invincible_takeforce 1 set g_balance_powerup_invincible_time 30 set g_balance_powerup_strength_damage 3 set g_balance_powerup_strength_force 3 diff --git a/balance-xdf.cfg b/balance-xdf.cfg index 562506283..2b123ff89 100644 --- a/balance-xdf.cfg +++ b/balance-xdf.cfg @@ -198,6 +198,7 @@ set g_maxpushtime 8.0 "timeout for kill credit when your damage knocks someone i // {{{ powerups set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken +set g_balance_powerup_invincible_takeforce 0.33 set g_balance_powerup_invincible_time 30 set g_balance_powerup_strength_damage 3 set g_balance_powerup_strength_force 3 diff --git a/balance-xonotic.cfg b/balance-xonotic.cfg index 32924a72d..90734fdde 100644 --- a/balance-xonotic.cfg +++ b/balance-xonotic.cfg @@ -198,6 +198,7 @@ set g_maxpushtime 8.0 "timeout for kill credit when your damage knocks someone i // {{{ powerups set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken +set g_balance_powerup_invincible_takeforce 0.33 set g_balance_powerup_invincible_time 30 set g_balance_powerup_strength_damage 3 set g_balance_powerup_strength_force 3 diff --git a/balance-xpm.cfg b/balance-xpm.cfg index 6901eda28..b9fa6f6a7 100644 --- a/balance-xpm.cfg +++ b/balance-xpm.cfg @@ -198,6 +198,7 @@ set g_maxpushtime 8.0 "timeout for kill credit when your damage knocks someone i // {{{ powerups set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken +set g_balance_powerup_invincible_takeforce 0.33 set g_balance_powerup_invincible_time 30 set g_balance_powerup_strength_damage 3 set g_balance_powerup_strength_force 3 diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 80da3f403..61fd12fbf 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -79,6 +79,7 @@ float autocvar_g_balance_pause_health_rot_spawn; float autocvar_g_balance_portal_health; float autocvar_g_balance_portal_lifetime; float autocvar_g_balance_powerup_invincible_takedamage; +float autocvar_g_balance_powerup_invincible_takeforce; //float autocvar_g_balance_powerup_invincible_time; float autocvar_g_balance_powerup_strength_damage; float autocvar_g_balance_powerup_strength_force; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 029660c2b..75bf81f8a 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -800,7 +800,13 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d // apply invincibility multiplier if (targ.items & ITEM_Shield.m_itemid) + { damage = damage * autocvar_g_balance_powerup_invincible_takedamage; + if (targ != attacker) + { + force = force * autocvar_g_balance_powerup_invincible_takeforce; + } + } } if (targ == attacker) -- 2.39.2