]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rework electro combos over time to always deal consistent damage
authorMario <mario.mario@y7mail.com>
Tue, 30 Jul 2024 01:38:58 +0000 (11:38 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 30 Jul 2024 01:38:58 +0000 (11:38 +1000)
bal-wep-mario.cfg
bal-wep-nexuiz25.cfg
bal-wep-samual.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/electro.qh
testing.cfg

index d3efbd81a57387ef4ca5114e46ef38002c536253..1e33c033278cb56eb4ecc31dcc464d1b43334371 100644 (file)
@@ -190,11 +190,9 @@ set g_balance_electro_combo_comboradius 300
 set g_balance_electro_combo_comboradius_thruwall 200
 set g_balance_electro_combo_damage 50
 set g_balance_electro_combo_damage_interval 0.05
-set g_balance_electro_combo_damage_linear 1
 set g_balance_electro_combo_duration 1.5
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 0
-set g_balance_electro_combo_power 3
 set g_balance_electro_combo_radius 150
 set g_balance_electro_combo_safeammocheck 1
 set g_balance_electro_combo_speed 2000
index 6610e671ad14bd488272a7210d7dcffabfb1cc4e..42c60d205f2a7601813f68dba141c6d5dcb91533 100644 (file)
@@ -190,11 +190,9 @@ set g_balance_electro_combo_comboradius 0
 set g_balance_electro_combo_comboradius_thruwall 0
 set g_balance_electro_combo_damage 80
 set g_balance_electro_combo_damage_interval 0.05
-set g_balance_electro_combo_damage_linear 0
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 200
-set g_balance_electro_combo_power 3
 set g_balance_electro_combo_radius 250
 set g_balance_electro_combo_safeammocheck 0
 set g_balance_electro_combo_speed 2000
index 4a1a2da11d1247b06198412e599c69c52ad3c89e..80a90339b8914f430720560c1a482d172486ff51 100644 (file)
@@ -190,11 +190,9 @@ set g_balance_electro_combo_comboradius 300
 set g_balance_electro_combo_comboradius_thruwall 200
 set g_balance_electro_combo_damage 50
 set g_balance_electro_combo_damage_interval 0.05
-set g_balance_electro_combo_damage_linear 0
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 120
-set g_balance_electro_combo_power 3
 set g_balance_electro_combo_radius 150
 set g_balance_electro_combo_safeammocheck 1
 set g_balance_electro_combo_speed 2000
index 0acce5c897bb600b3a3bea011a799fe3b67e4e52..b0f3c62656fba02ec2d993e02529c64f5adff1b7 100644 (file)
@@ -190,11 +190,9 @@ set g_balance_electro_combo_comboradius 275
 set g_balance_electro_combo_comboradius_thruwall 200
 set g_balance_electro_combo_damage 50
 set g_balance_electro_combo_damage_interval 0.05
-set g_balance_electro_combo_damage_linear 0
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 120
-set g_balance_electro_combo_power 3
 set g_balance_electro_combo_radius 175
 set g_balance_electro_combo_safeammocheck 1
 set g_balance_electro_combo_speed 2000
index 80259bbec573f0c6b33add9272881a59ca6992c1..e3e7fbd90e640ddf2cae29e66fd47f0ef4e9151c 100644 (file)
@@ -190,11 +190,9 @@ set g_balance_electro_combo_comboradius 300
 set g_balance_electro_combo_comboradius_thruwall 200
 set g_balance_electro_combo_damage 50
 set g_balance_electro_combo_damage_interval 0.05
-set g_balance_electro_combo_damage_linear 0
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 120
-set g_balance_electro_combo_power 3
 set g_balance_electro_combo_radius 150
 set g_balance_electro_combo_safeammocheck 1
 set g_balance_electro_combo_speed 2000
index db375c546e5081890518911aad73c8011405b2f9..045c5cb9a973859bb4860ec1039de0770c739507 100644 (file)
@@ -54,14 +54,8 @@ void W_Electro_TriggerCombo(vector org, float rad, entity own)
 void W_Electro_ExplodeComboThink(entity this)
 {
        float dt = time - this.teleport_time + this.dmg_interval;
-       float dmg_remaining_next = (bound(0, 1 - dt / this.dmg_duration, 1) ** this.dmg_power);
 
-       float f = this.dmg_last - dmg_remaining_next;
-       this.dmg_last = dmg_remaining_next;
-
-       float dmg_scale = ((this.dmg_linear) ? this.dmg_interval : f);
-
-       RadiusDamage(this, this.realowner, this.dmg * dmg_scale, this.dmg_edge * dmg_scale, this.dmg_radius, NULL, NULL, this.dmg_force * f, this.projectiledeathtype, this.weaponentity_fld, NULL);
+       RadiusDamage(this, this.realowner, this.dmg, this.dmg_edge, this.dmg_radius, NULL, NULL, this.dmg_force, this.projectiledeathtype, this.weaponentity_fld, NULL);
        this.projectiledeathtype |= HITTYPE_BOUNCE; // ensure it doesn't spam its effect
 
        if(dt < this.dmg_duration)
@@ -86,14 +80,14 @@ void W_Electro_ExplodeCombo(entity this)
 
                setthink(this, W_Electro_ExplodeComboThink);
                this.nextthink = time;
-               this.dmg = WEP_CVAR(electro, combo_damage);
-               this.dmg_edge = WEP_CVAR(electro, combo_edgedamage);
+               this.dmg_interval = WEP_CVAR(electro, combo_damage_interval);
+               if(!this.dmg_interval)
+                       this.dmg_interval = PHYS_INPUT_TIMELENGTH;
+               this.dmg = WEP_CVAR(electro, combo_damage) * this.dmg_interval;
+               this.dmg_edge = WEP_CVAR(electro, combo_edgedamage) * this.dmg_interval;
                this.dmg_radius = WEP_CVAR(electro, combo_radius);
-               this.dmg_force = WEP_CVAR(electro, combo_force);
-               this.dmg_power = WEP_CVAR(electro, combo_power);
+               this.dmg_force = WEP_CVAR(electro, combo_force) * this.dmg_interval;
                this.dmg_duration = WEP_CVAR(electro, combo_duration);
-               this.dmg_interval = WEP_CVAR(electro, combo_damage_interval);
-               this.dmg_linear = WEP_CVAR(electro, combo_damage_linear);
                this.teleport_time = time;
                this.dmg_last = 1;
                set_movetype(this, MOVETYPE_NONE);
index 721d34889f1cdfeeb1c80cbe22421babbb0d1497..be3bcfb5e9b40789892c13c0e79f1c2a9daad257 100644 (file)
@@ -30,12 +30,10 @@ CLASS(Electro, Weapon)
                P(class, prefix, combo_comboradius_thruwall, float, NONE) \
                P(class, prefix, combo_damage, float, NONE) \
                P(class, prefix, combo_damage_interval, float, NONE) \
-               P(class, prefix, combo_damage_linear, float, NONE) \
                P(class, prefix, combo_duration, float, NONE) \
                P(class, prefix, combo_edgedamage, float, NONE) \
                P(class, prefix, combo_force, float, NONE) \
                P(class, prefix, combo_radius, float, NONE) \
-               P(class, prefix, combo_power, float, NONE) \
                P(class, prefix, combo_safeammocheck, float, NONE) \
                P(class, prefix, combo_speed, float, NONE) \
                P(class, prefix, count, float, SEC) \
@@ -86,11 +84,9 @@ SPAWNFUNC_WEAPON(weapon_electro, WEP_ELECTRO)
 .float dmg_edge;
 .float dmg_radius;
 .float dmg_force;
-.float dmg_power;
 .float dmg_duration;
 .float dmg_last;
 .float dmg_interval;
-.float dmg_linear;
 
 IntrusiveList LimitedElectroBallRubbleList;
 .float electro_count;
index bfa0721a99327b95111f5352d8a1234555a004db..6c725eab55e1e90bfe5ecd3e5b680fabada960f0 100644 (file)
@@ -14,7 +14,7 @@ alias test_arc_bounce_burst "settemp g_balance_arc_bolt_bounce_count 1 ; settemp
 alias test_ctf_stalemate90 "settemp g_ctf_stalemate_time 90"
 alias test_ctf_stalemate120 "settemp g_ctf_stalemate_time 120"
 
-alias test_electro_combo_over_time "settemp g_balance_electro_combo_damage_interval 0.05 ; settemp g_balance_electro_combo_duration 1.5 ; settemp g_balance_electro_combo_power 3 ; settemp g_balance_electro_combo_damage_linear 1 ; settemp g_balance_electro_combo_force 0"
+alias test_electro_combo_over_time "settemp g_balance_electro_combo_damage_interval 0.05 ; settemp g_balance_electro_combo_duration 1.5 ; settemp g_balance_electro_combo_force 0"
 
 alias testing_enable "addvote test_blaster_switch ; addvote test_crylink_sec_horizontal ; addvote test_rocket_flying ; addvote test_ctf_stalemate90 ; addvote test_ctf_stalemate120 ; addvote test_arc_bounce ; addvote test_arc_bounce_burst ; addvote test_electro_combo_over_time"
 alias testing_disable "delvote test_blaster_switch ; delvote test_crylink_sec_horizontal ; delvote test_rocket_flying ; delvote test_ctf_stalemate90 ; delvote test_ctf_stalemate120 ; delvote test_arc_bounce ; delvote test_arc_bounce_burst ; delvote test_electro_combo_over_time"