From: Mario Date: Tue, 16 Jul 2019 15:21:59 +0000 (+1000) Subject: Turrets: Don't target entities with an aiment of the same team (fixes turrets attacki... X-Git-Tag: xonotic-v0.8.5~1459 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ed53aabc3862f023e633a2a11168109dd1dbfe48;p=xonotic%2Fxonotic-data.pk3dir.git Turrets: Don't target entities with an aiment of the same team (fixes turrets attacking out-portals) --- 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 } }