]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add an option to configure the rate at which the Electro combo damages players
authorMario <mario.mario@y7mail.com>
Tue, 14 Jan 2020 14:12:55 +0000 (00:12 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 14 Jan 2020 14:12:55 +0000 (00:12 +1000)
bal-wep-mario.cfg
bal-wep-nexuiz25.cfg
bal-wep-samual.cfg
bal-wep-testing.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/electro.qh

index 234c2664467a83b0988c0b9b774508bb9216fd7d..1ee9dbee83ff115e9aae8421133d1e608581d282 100644 (file)
@@ -179,6 +179,7 @@ set g_balance_minelayer_weaponthrowable 1
 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_damagerate 0.05
 set g_balance_electro_combo_duration 1.5
 set g_balance_electro_combo_edgedamage 45
 set g_balance_electro_combo_force -100
index 4f9aa792623de9cebee44c32852311d5f88f8075..c3580487d66be48535a4f8dcc39238d9babb98fc 100644 (file)
@@ -179,6 +179,7 @@ set g_balance_minelayer_weaponthrowable 1
 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_damagerate 0.05
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 200
index c3007e015c690faf6ddcc9cf86e73fc5ca5f01b1..413e1a75fc2a94185fe25bf553102906c54765dd 100644 (file)
@@ -179,6 +179,7 @@ set g_balance_minelayer_weaponthrowable 1
 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_damagerate 0.05
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 120
index 4da4ab66d91cc6f29f67e9ab23e8d00077878dc0..22f8a7b9cf0124fad637d90e99616bc3fd85dcd5 100644 (file)
@@ -179,6 +179,7 @@ set g_balance_minelayer_weaponthrowable 1
 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_damagerate 0.05
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 120
index 7280c5bdb471db3469e3a2e487df25c247b6f3b8..13e2683d5cdafdd3b2bb399cb6e66aa8df8328bc 100644 (file)
@@ -179,6 +179,7 @@ set g_balance_minelayer_weaponthrowable 1
 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_damagerate 0.05
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 120
index 5f9f754c27288ea429f00a79de65148ee42fa1d4..c8948f20c6763bedeaa7420ad7f7fca5f0ccfbb0 100644 (file)
@@ -179,6 +179,7 @@ set g_balance_minelayer_weaponthrowable 1
 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_damagerate 0.05
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 120
index f1cc5ba153cd7494ec83b48f8421ed504b575262..dfba8f62b49aed63529f3b41a88d8009993537f4 100644 (file)
@@ -51,7 +51,7 @@ void W_Electro_TriggerCombo(vector org, float rad, entity own)
 
 void W_Electro_ExplodeComboThink(entity this)
 {
-       float dt = time - this.teleport_time;
+       float dt = time - this.teleport_time + this.dmg_rate;
        float dmg_remaining_next = (bound(0, 1 - dt / this.dmg_duration, 1) ** this.dmg_power);
 
        float f = this.dmg_last - dmg_remaining_next;
@@ -61,7 +61,7 @@ void W_Electro_ExplodeComboThink(entity this)
        this.projectiledeathtype |= HITTYPE_BOUNCE; // ensure it doesn't spam its effect
 
        if(dt < this.dmg_duration)
-               this.nextthink = time + 0.05; // soon
+               this.nextthink = time + this.dmg_rate; // soon
        else
                delete(this);
 }
@@ -87,6 +87,7 @@ void W_Electro_ExplodeCombo(entity this)
                this.dmg_force = WEP_CVAR(electro, combo_force);
                this.dmg_power = WEP_CVAR(electro, combo_power);
                this.dmg_duration = WEP_CVAR(electro, combo_duration);
+               this.dmg_rate = WEP_CVAR(electro, combo_damagerate);
                this.teleport_time = time;
                this.dmg_last = 1;
                set_movetype(this, MOVETYPE_NONE);
index d081f15bf0dd051820412dcb9b7a0c022e7195f5..febb6e32287c3566d9d11ac5e8ba01cb516403a9 100644 (file)
@@ -27,6 +27,7 @@ CLASS(Electro, Weapon)
                P(class, prefix, combo_comboradius, float, NONE) \
                P(class, prefix, combo_comboradius_thruwall, float, NONE) \
                P(class, prefix, combo_damage, float, NONE) \
+               P(class, prefix, combo_damagerate, float, NONE) \
                P(class, prefix, combo_duration, float, NONE) \
                P(class, prefix, combo_edgedamage, float, NONE) \
                P(class, prefix, combo_force, float, NONE) \
@@ -79,6 +80,7 @@ SPAWNFUNC_WEAPON(weapon_electro, WEP_ELECTRO)
 .float dmg_power;
 .float dmg_duration;
 .float dmg_last;
+.float dmg_rate;
 
 .float electro_count;
 .float electro_secondarytime;