From: LegendaryGuard Date: Sun, 10 Jul 2022 21:18:26 +0000 (+0200) Subject: Finally! Tesla turret owner's nade no longer treacherously attacks in non-team gamemo... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8ffad7b4189ada9557590d720cfa99f338022219;p=xonotic%2Fxonotic-data.pk3dir.git Finally! Tesla turret owner's nade no longer treacherously attacks in non-team gamemodes :) --- diff --git a/qcsrc/common/turrets/turret/tesla.qc b/qcsrc/common/turrets/turret/tesla.qc index 4c27bc9acc..f90672b65d 100644 --- a/qcsrc/common/turrets/turret/tesla.qc +++ b/qcsrc/common/turrets/turret/tesla.qc @@ -62,6 +62,7 @@ bool turret_tesla_firecheck(entity this) if (turret_validate_target(this, this.enemy, this.target_validate_flags) <= 0) { this.enemy = NULL; + if(turret_select_target(this) == this.realowner) return false; this.target_validate_time = time + 0.5; do_target_scan = 1; } diff --git a/qcsrc/common/turrets/turret/tesla_weapon.qc b/qcsrc/common/turrets/turret/tesla_weapon.qc index b62201eb98..f6102801d1 100644 --- a/qcsrc/common/turrets/turret/tesla_weapon.qc +++ b/qcsrc/common/turrets/turret/tesla_weapon.qc @@ -73,7 +73,8 @@ entity toast(entity actor, entity from, float range, float damage) if (etarget) { te_csqc_lightningarc(from.origin, etarget.origin); - Damage(etarget, actor, actor, damage, DEATH_TURRET_TESLA.m_id, DMG_NOWEP, etarget.origin, '0 0 0'); + if (etarget != actor.realowner) + Damage(etarget, actor, actor, damage, DEATH_TURRET_TESLA.m_id, DMG_NOWEP, etarget.origin, '0 0 0'); etarget.railgunhit = true; IL_PUSH(g_railgunhit, etarget); }