]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Finally! Tesla turret owner's nade no longer treacherously attacks in non-team gamemo...
authorLegendaryGuard <rootuser999@gmail.com>
Sun, 10 Jul 2022 21:18:26 +0000 (23:18 +0200)
committerLegendaryGuard <rootuser999@gmail.com>
Sun, 10 Jul 2022 21:18:26 +0000 (23:18 +0200)
qcsrc/common/turrets/turret/tesla.qc
qcsrc/common/turrets/turret/tesla_weapon.qc

index 4c27bc9acce8cd112e0426e0062a0cceee1e115e..f90672b65df3ec6998b6289347e18c9ba868d983 100644 (file)
@@ -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;
     }
index b62201eb983e3523118b39eb1b71e3fde321f10b..f6102801d1f70cfb70d644557441b3cae404e6ab 100644 (file)
@@ -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);
     }