From ed53aabc3862f023e633a2a11168109dd1dbfe48 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 17 Jul 2019 01:21:59 +1000 Subject: [PATCH] Turrets: Don't target entities with an aiment of the same team (fixes turrets attacking out-portals) --- qcsrc/common/turrets/sv_turrets.qc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index 18197c078..84aae1933 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -756,6 +756,9 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl if (e_turret.team != e_target.owner.team) return -12; + + if (e_turret.team != e_target.aiment.team) + return -12; // portals } else { @@ -764,6 +767,9 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl if (e_turret.team == e_target.owner.team) return -14; + + if (e_turret.team == e_target.aiment.team) + return -14; // portals } } -- 2.39.2