]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into Melanosuchus/single_player
authorMattia Basaglia <mattia.basaglia@gmail.com>
Sat, 18 Mar 2017 10:22:39 +0000 (10:22 +0000)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Sat, 18 Mar 2017 10:22:39 +0000 (10:22 +0000)
1  2 
qcsrc/common/turrets/sv_turrets.qc

index 5604b23544543cb32eaa1534639095478f1f84f1,d6442df8b4f11f14436787e461d46f58369a3e1c..ed86ac0c86ffebee57bdf9f0fad36068c52b5e7b
@@@ -196,21 -190,12 +196,25 @@@ void turret_die(entity this
        //RadiusDamage (this,this, min(this.ammo,50),min(this.ammo,50) * 0.25,250,NULL,min(this.ammo,50)*5,DEATH_TURRET,NULL);
  
        Turret tur = get_turretinfo(this.m_id);
 +    
 +      // Trigger target_death
 +      if ( this.target_death != "" )
 +      {
 +              for(entity t = NULL; (t = find(t, targetname, this.target_death)); )
 +              {
 +                      if ( t.use )
 +                      {
 +                              t.use(t, this.killer, this);
 +                      }
 +              }
 +      }
 +    
        if(this.damage_flags & TFL_DMG_DEATH_NORESPAWN)
        {
+               // do a simple explosion effect here, since CSQC can't do it on a to-be-removed entity
+               sound(this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
+               Send_Effect(EFFECT_ROCKET_EXPLODE, this.origin, '0 0 0', 1);
                tur.tr_death(tur, this);
  
                delete(this.tur_head);