]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix Arc bolts bouncing more times than they're supposed to, rename the bounce_damage...
authorMario <mario.mario@y7mail.com>
Thu, 8 Oct 2020 04:03:06 +0000 (14:03 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 8 Oct 2020 04:03:06 +0000 (14:03 +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/arc.qc
qcsrc/common/weapons/weapon/arc.qh
testing.cfg

index 218a807bb8b0241ba9367d5c92d11db9d9129717..640ce27209e6a0ea53af3d7cdf6a3afb2f5dad8b 100644 (file)
@@ -764,7 +764,7 @@ set g_balance_arc_beam_tightness 0.6
 set g_balance_arc_bolt 1
 set g_balance_arc_bolt_ammo 1
 set g_balance_arc_bolt_bounce_count 0
-set g_balance_arc_bolt_bounce_damage 0
+set g_balance_arc_bolt_bounce_explode 0
 set g_balance_arc_bolt_bounce_lifetime 0
 set g_balance_arc_bolt_count 1
 set g_balance_arc_bolt_damage 25
index 2f68b17cbb809b2f83f0005d48305aaf4980d2bc..1cbfe88e9801504a1c1daa8e1880e2f68408003b 100644 (file)
@@ -764,7 +764,7 @@ set g_balance_arc_beam_tightness 0.5
 set g_balance_arc_bolt 0
 set g_balance_arc_bolt_ammo 1
 set g_balance_arc_bolt_bounce_count 0
-set g_balance_arc_bolt_bounce_damage 0
+set g_balance_arc_bolt_bounce_explode 0
 set g_balance_arc_bolt_bounce_lifetime 0
 set g_balance_arc_bolt_count 1
 set g_balance_arc_bolt_damage 25
index bb231b6855bcc02ef54a986a78259de98323ae34..055afcc2a38c299a254f8de33b9a619ae2e12423 100644 (file)
@@ -764,7 +764,7 @@ set g_balance_arc_beam_tightness 0.5
 set g_balance_arc_bolt 0
 set g_balance_arc_bolt_ammo 1
 set g_balance_arc_bolt_bounce_count 0
-set g_balance_arc_bolt_bounce_damage 0
+set g_balance_arc_bolt_bounce_explode 0
 set g_balance_arc_bolt_bounce_lifetime 0
 set g_balance_arc_bolt_count 1
 set g_balance_arc_bolt_damage 25
index 7f6237e37712545898efc45abdafa5c3f10cca96..a1fea0c38726e2dd3042ecabcdeca6ad491b4b73 100644 (file)
@@ -764,7 +764,7 @@ set g_balance_arc_beam_tightness 0.5
 set g_balance_arc_bolt 1
 set g_balance_arc_bolt_ammo 1
 set g_balance_arc_bolt_bounce_count 0
-set g_balance_arc_bolt_bounce_damage 0
+set g_balance_arc_bolt_bounce_explode 0
 set g_balance_arc_bolt_bounce_lifetime 0
 set g_balance_arc_bolt_count 1
 set g_balance_arc_bolt_damage 25
index 69715d5583c940877cbbb2725ed17bbf227ee7b2..647fb2290727424f03e92d624da2c5787724649e 100644 (file)
@@ -764,7 +764,7 @@ set g_balance_arc_beam_tightness 0.6
 set g_balance_arc_bolt 1
 set g_balance_arc_bolt_ammo 1
 set g_balance_arc_bolt_bounce_count 0
-set g_balance_arc_bolt_bounce_damage 0
+set g_balance_arc_bolt_bounce_explode 0
 set g_balance_arc_bolt_bounce_lifetime 0
 set g_balance_arc_bolt_count 1
 set g_balance_arc_bolt_damage 25
index 2f9b84ed551852c6effa4b17a9b7e5fc0d509fca..44fd539bebc5feca780e89e059f5a5f7de1c8461 100644 (file)
@@ -118,19 +118,18 @@ void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float dam
 void W_Arc_Bolt_Touch(entity this, entity toucher)
 {
        PROJECTILE_TOUCH(this, toucher);
-       if(this.cnt > WEP_CVAR(arc, bolt_bounce_count) || !WEP_CVAR(arc, bolt_bounce_count) || toucher.takedamage == DAMAGE_AIM) {
+       if(this.cnt >= WEP_CVAR(arc, bolt_bounce_count) || !WEP_CVAR(arc, bolt_bounce_count) || toucher.takedamage == DAMAGE_AIM) {
                this.use(this, NULL, toucher);
        } else {
-               if(!this.cnt && WEP_CVAR(arc, bolt_bounce_lifetime))
-                       this.nextthink = min(this.nextthink, time + WEP_CVAR(arc, bolt_bounce_lifetime));
                this.cnt++;
                Send_Effect(EFFECT_BALL_SPARKS, this.origin, this.velocity, 1);
                this.angles = vectoangles(this.velocity);
                this.owner = NULL;
-               // initial blast doesn't count as bounce damage!
-               if(WEP_CVAR(arc, bolt_bounce_damage))
-                       RadiusDamage(this, this.realowner, WEP_CVAR(arc, bolt_damage), WEP_CVAR(arc, bolt_edgedamage), WEP_CVAR(arc, bolt_radius), NULL, NULL, WEP_CVAR(arc, bolt_force), this.projectiledeathtype, this.weaponentity_fld, toucher);
                this.projectiledeathtype |= HITTYPE_BOUNCE;
+               if(WEP_CVAR(arc, bolt_bounce_explode))
+                       RadiusDamage(this, this.realowner, WEP_CVAR(arc, bolt_damage), WEP_CVAR(arc, bolt_edgedamage), WEP_CVAR(arc, bolt_radius), NULL, NULL, WEP_CVAR(arc, bolt_force), this.projectiledeathtype, this.weaponentity_fld, toucher);
+               if(this.cnt == 1 && WEP_CVAR(arc, bolt_bounce_lifetime))
+                       this.nextthink = time + WEP_CVAR(arc, bolt_bounce_lifetime);
        }
 }
 
index ec15d8db7e09eba29e991575c54d057aa5ba36b7..6db349889b80599587eb7a0b0e59333ba2de6668 100644 (file)
@@ -24,7 +24,7 @@ CLASS(Arc, Weapon)
                P(class, prefix, bolt, float, NONE) \
                P(class, prefix, bolt_ammo, float, NONE) \
         P(class, prefix, bolt_bounce_count, float, NONE) \
-        P(class, prefix, bolt_bounce_damage, float, NONE) \
+        P(class, prefix, bolt_bounce_explode, float, NONE) \
         P(class, prefix, bolt_bounce_lifetime, float, NONE) \
         P(class, prefix, bolt_count, float, NONE) \
         P(class, prefix, bolt_damageforcescale, float, NONE) \
index 2b6239ae1a68d6ff347649277c9b013fe0d120aa..e52012cedec6f533212fd97a51fc92872d253c67 100644 (file)
@@ -6,8 +6,8 @@ alias test_crylink_sec_horizontal "settemp g_balance_crylink_secondary_linkexplo
 
 alias test_rocket_flying "settemp g_balance_devastator_remote_jump 1"
 
-alias test_arc_bounce "settemp g_balance_arc_bolt_bounce_count 1 ; settemp g_balance_arc_bolt_bounce_lifetime 0.5 ; settemp g_balance_arc_bolt_bounce_damage 1 ; settemp g_balance_arc_bolt_ammo 2"
-alias test_arc_bounce_burst "settemp g_balance_arc_bolt_bounce_count 1 ; settemp g_balance_arc_bolt_bounce_lifetime 0.5 ; settemp g_balance_arc_bolt_bounce_damage 1 ; settemp g_balance_arc_bolt_ammo 3 ; settemp g_balance_arc_bolt_refire2 0.33333 ; settemp g_balance_arc_bolt_count 3"
+alias test_arc_bounce "settemp g_balance_arc_bolt_bounce_count 1 ; settemp g_balance_arc_bolt_bounce_lifetime 0.5 ; settemp g_balance_arc_bolt_bounce_explode 1 ; settemp g_balance_arc_bolt_ammo 2"
+alias test_arc_bounce_burst "settemp g_balance_arc_bolt_bounce_count 1 ; settemp g_balance_arc_bolt_bounce_lifetime 0.5 ; settemp g_balance_arc_bolt_bounce_explode 1 ; settemp g_balance_arc_bolt_ammo 3 ; settemp g_balance_arc_bolt_refire2 0.33333 ; settemp g_balance_arc_bolt_count 3"
 
 // https://forums.xonotic.org/showthread.php?tid=8192
 // https://gitlab.com/xonotic/xonotic-data.pk3dir/merge_requests/736