From: drjaska Date: Tue, 16 May 2023 05:12:58 +0000 (+0300) Subject: opt-in cvar g_balance_damagepush_speedfactor_onlyself X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F1117%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git opt-in cvar g_balance_damagepush_speedfactor_onlyself --- diff --git a/balance-mario.cfg b/balance-mario.cfg index 8b9f37ac1..494797e29 100644 --- a/balance-mario.cfg +++ b/balance-mario.cfg @@ -220,6 +220,7 @@ set g_balance_falldamage_factor 0.20 set g_balance_falldamage_maxdamage 40 set g_balance_falldamage_onlyvertical 0 set g_balance_damagepush_speedfactor 2.5 +set g_balance_damagepush_speedfactor_onlyself 0 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage set g_balance_contents_drowndelay 10 // time under water before a player begins drowning set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning diff --git a/balance-nexuiz25.cfg b/balance-nexuiz25.cfg index 0b39de222..7824ece78 100644 --- a/balance-nexuiz25.cfg +++ b/balance-nexuiz25.cfg @@ -220,6 +220,7 @@ set g_balance_falldamage_factor 0.15 set g_balance_falldamage_maxdamage 25 set g_balance_falldamage_onlyvertical 0 set g_balance_damagepush_speedfactor 0 +set g_balance_damagepush_speedfactor_onlyself 0 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage set g_balance_contents_drowndelay 10 // time under water before a player begins drowning set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning diff --git a/balance-overkill.cfg b/balance-overkill.cfg index 3944d7d3b..69c0840ab 100644 --- a/balance-overkill.cfg +++ b/balance-overkill.cfg @@ -220,6 +220,7 @@ set g_balance_falldamage_factor 0.20 set g_balance_falldamage_maxdamage 40 set g_balance_falldamage_onlyvertical 0 set g_balance_damagepush_speedfactor 2.5 +set g_balance_damagepush_speedfactor_onlyself 0 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage set g_balance_contents_drowndelay 10 // time under water before a player begins drowning set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning diff --git a/balance-samual.cfg b/balance-samual.cfg index 5686c58d6..d8ab94e8b 100644 --- a/balance-samual.cfg +++ b/balance-samual.cfg @@ -220,6 +220,7 @@ set g_balance_falldamage_factor 0.20 set g_balance_falldamage_maxdamage 40 set g_balance_falldamage_onlyvertical 0 set g_balance_damagepush_speedfactor 2.5 +set g_balance_damagepush_speedfactor_onlyself 0 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage set g_balance_contents_drowndelay 10 // time under water before a player begins drowning set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning diff --git a/balance-xdf.cfg b/balance-xdf.cfg index d8d4df60d..6a6e8a1cb 100644 --- a/balance-xdf.cfg +++ b/balance-xdf.cfg @@ -220,6 +220,7 @@ set g_balance_falldamage_factor 0.20 set g_balance_falldamage_maxdamage 40 set g_balance_falldamage_onlyvertical 0 set g_balance_damagepush_speedfactor 2.5 +set g_balance_damagepush_speedfactor_onlyself 0 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage set g_balance_contents_drowndelay 10 // time under water before a player begins drowning set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning diff --git a/balance-xonotic.cfg b/balance-xonotic.cfg index a3bda49dc..23f11bf1a 100644 --- a/balance-xonotic.cfg +++ b/balance-xonotic.cfg @@ -220,6 +220,7 @@ set g_balance_falldamage_factor 0.20 set g_balance_falldamage_maxdamage 40 set g_balance_falldamage_onlyvertical 0 set g_balance_damagepush_speedfactor 2.5 "scale self-damage's force with respect to target's velocity, this creates a speed limit and faster players stop themselves more easily" +set g_balance_damagepush_speedfactor_onlyself 0 "apply only to self inflicted forces" set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage set g_balance_contents_drowndelay 10 // time under water before a player begins drowning set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning diff --git a/balance-xpm.cfg b/balance-xpm.cfg index 87b781a55..f5249c3f3 100644 --- a/balance-xpm.cfg +++ b/balance-xpm.cfg @@ -220,6 +220,7 @@ set g_balance_falldamage_factor 0.20 set g_balance_falldamage_maxdamage 40 set g_balance_falldamage_onlyvertical 0 set g_balance_damagepush_speedfactor 2.5 +set g_balance_damagepush_speedfactor_onlyself 0 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage set g_balance_contents_drowndelay 10 // time under water before a player begins drowning set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning diff --git a/qcsrc/server/damage.qc b/qcsrc/server/damage.qc index c3bdc0459..7adad9428 100644 --- a/qcsrc/server/damage.qc +++ b/qcsrc/server/damage.qc @@ -830,8 +830,9 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de if (!IS_PLAYER(targ) || !StatusEffects_active(STATUSEFFECT_SpawnShield, targ) || targ == attacker) { 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 (autocvar_g_balance_damagepush_speedfactor) + if (!autocvar_g_balance_damagepush_speedfactor_onlyself || (attacker == targ)) + farce = damage_explosion_calcpush(farce, targ.velocity, autocvar_g_balance_damagepush_speedfactor); if(targ.move_movetype == MOVETYPE_PHYSICS) { diff --git a/qcsrc/server/damage.qh b/qcsrc/server/damage.qh index a1dadc1a2..e4a9d0a69 100644 --- a/qcsrc/server/damage.qh +++ b/qcsrc/server/damage.qh @@ -16,6 +16,7 @@ bool autocvar_g_mirrordamage_virtual; bool autocvar_g_mirrordamage_onlyweapons; float autocvar_g_maxpushtime; float autocvar_g_balance_damagepush_speedfactor; +bool autocvar_g_balance_damagepush_speedfactor_onlyself; int autocvar_g_balance_firetransfer_damage; int autocvar_g_balance_firetransfer_time; float autocvar_g_balance_armor_blockpercent;