From: Mattia Basaglia Date: Sat, 18 Mar 2017 10:22:39 +0000 (+0000) Subject: Merge remote-tracking branch 'origin/master' into Melanosuchus/single_player X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9d2cf3e43ae8d0658f8c771df8fb17d85239f753;p=xonotic%2Fxonotic-data.pk3dir.git Merge remote-tracking branch 'origin/master' into Melanosuchus/single_player --- 9d2cf3e43ae8d0658f8c771df8fb17d85239f753 diff --cc qcsrc/common/turrets/sv_turrets.qc index 5604b2354,d6442df8b..ed86ac0c8 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@@ -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);