]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/electro_combo_over_time
authorMario <mario.mario@y7mail.com>
Mon, 2 Sep 2024 09:29:10 +0000 (19:29 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 2 Sep 2024 09:29:10 +0000 (19:29 +1000)
1  2 
.gitlab-ci.yml
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

diff --cc .gitlab-ci.yml
index 0bca6f4e8fbfdf61ae7830db84e7d66693fa5670,d96b58c55e4f71de6d2335ba10d1c94fb4f13af6..2d83b2906cf85acdd400a216d2bd59ba3cdb5ff9
@@@ -36,7 -36,7 +36,7 @@@ test_compilation_units
  test_sv_game:
    stage: test
    script:
-     - export EXPECT=8aec9e8dd8fb0a69e500979f67d4f7e8
 -    - export EXPECT=28a49dd762a7a794f210eeadbbc37a8e
++    - export EXPECT=f42b46132cecd1a3516f6196ef8ece98
      - qcsrc/tools/sv_game-hashtest.sh
      - exit $?
  
Simple merge
Simple merge
Simple merge
diff --cc bal-wep-xdf.cfg
Simple merge
Simple merge
index a71c8c5452447c3612f6c97937379f13a71f6ac3,d45810c0864586556f71f9f039d473b9bd7b5032..b572dfc945a4af8a9341577f3f7d14f0aca5c18d
@@@ -51,51 -51,14 +51,52 @@@ void W_Electro_TriggerCombo(vector org
        }
  }
  
 +void W_Electro_ExplodeComboThink(entity this)
 +{
 +      if(time - this.teleport_time > this.dmg_duration)
 +      {
 +              delete(this);
 +              return;
 +      }
 +
 +      this.nextthink = time;
 +
 +      float damage = this.dmg * PHYS_INPUT_TIMELENGTH;
 +      float edgedamage = this.dmg_edge * PHYS_INPUT_TIMELENGTH;
 +
 +      RadiusDamage(this, this.realowner, damage, edgedamage, this.dmg_radius, NULL, NULL, 0, this.projectiledeathtype, this.weaponentity_fld, NULL);
 +      this.projectiledeathtype |= HITTYPE_TERTIARY; // ensure it doesn't spam its effect
 +}
 +
  void W_Electro_ExplodeCombo(entity this)
  {
-       W_Electro_TriggerCombo(this.origin, WEP_CVAR(electro, combo_comboradius), this.realowner);
+       W_Electro_TriggerCombo(this.origin, WEP_CVAR(WEP_ELECTRO, combo_comboradius), this.realowner);
  
        this.event_damage = func_null;
-       this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
+       if (!this.velocity)
+               this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
  
 +      if(WEP_CVAR(electro, combo_duration))
 +      {
 +              this.projectiledeathtype = WEP_ELECTRO.m_id | HITTYPE_BOUNCE; // use THIS type for a combo because primary can't bounce
 +              this.event_damage = func_null;
 +              settouch(this, func_null);
 +              this.effects |= EF_NODRAW; // hide the orb, rely only on the effect
 +
 +              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_radius = WEP_CVAR(electro, combo_radius);
 +              this.dmg_duration = WEP_CVAR(electro, combo_duration);
 +              this.teleport_time = time;
 +              set_movetype(this, MOVETYPE_NONE);
 +
 +              // fire the first damage tick immediately
 +              getthink(this)(this);
 +              return;
 +      }
 +
        RadiusDamage(
                this,
                this.realowner,