From b714154329dc2db4f656281198fd71823c68fd5e Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Sat, 18 Mar 2017 10:57:19 +0000 Subject: [PATCH] Use target2 for turret death target --- qcsrc/common/turrets/sv_turrets.qc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index ed86ac0c8..f2f219023 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -5,9 +5,6 @@ // Entity damaging the turrent when it reaches 0 health .entity killer; -// Target triggered when the turret is destoryed -.string target_death; - // Generic aiming vector turret_aim_generic(entity this) { @@ -197,16 +194,12 @@ void turret_die(entity this) Turret tur = get_turretinfo(this.m_id); - // Trigger target_death - if ( this.target_death != "" ) + // Trigger target2 on death + if ( this.target2 != "" ) { - for(entity t = NULL; (t = find(t, targetname, this.target_death)); ) - { - if ( t.use ) - { - t.use(t, this.killer, this); - } - } + string oldtarget = this.target; + SUB_UseTargets(this, this.killer, NULL); + this.target = oldtarget; } if(this.damage_flags & TFL_DMG_DEATH_NORESPAWN) -- 2.39.2