]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
opt-in cvar g_balance_damagepush_speedfactor_onlyself drjaska/self-dp_sf 1117/head
authordrjaska <drjaska83@gmail.com>
Tue, 16 May 2023 05:12:58 +0000 (08:12 +0300)
committerdrjaska <drjaska83@gmail.com>
Tue, 16 May 2023 05:20:26 +0000 (08:20 +0300)
balance-mario.cfg
balance-nexuiz25.cfg
balance-overkill.cfg
balance-samual.cfg
balance-xdf.cfg
balance-xonotic.cfg
balance-xpm.cfg
qcsrc/server/damage.qc
qcsrc/server/damage.qh

index 8b9f37ac10d7782c60f1248aef0e82feb4cd2c5f..494797e29f8a9161fdfd3fe4b0a599845116eb63 100644 (file)
@@ -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
index 0b39de222f3a3305f0836801995204cdcbfe45db..7824ece78bedc89ae1f431b11c1fcc985e0bcc85 100644 (file)
@@ -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
index 3944d7d3b18ab87d6cc280e38df1c23360bf912f..69c0840abc1658493103253630f239af3c5c305e 100644 (file)
@@ -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
index 5686c58d6e24fa2eb211af18644d7ecd536986b6..d8ab94e8bcf1fc2b54b01d93650c7d867909992c 100644 (file)
@@ -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
index d8d4df60d53e2a6c916d61a7785bb07df3efd8b8..6a6e8a1cb782acdbefbdab4071e45fec0a4b505a 100644 (file)
@@ -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
index a3bda49dc6fc822d8c5e9ce6fe483ec909714d0d..23f11bf1a3e240d0514bd65b22e71c25d6b53ef9 100644 (file)
@@ -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
index 87b781a555216639bb618652be91097abfe09e62..f5249c3f30e37b1e0d6df389734dc4745f807e60 100644 (file)
@@ -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
index c3bdc04590fa655c75c8cccb046df88a9e9c7a39..7adad9428cc018d3b19ed593dacfcba053f2c1c9 100644 (file)
@@ -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)
                {
index a1dadc1a28f052017abbcbddd6252a3c7ec3cc65..e4a9d0a6931d422747d75ae528b12acef9898022 100644 (file)
@@ -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;