]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Turrets: Don't target entities with an aiment of the same team (fixes turrets attacki...
authorMario <mario@smbclan.net>
Tue, 16 Jul 2019 15:21:59 +0000 (01:21 +1000)
committerMario <mario@smbclan.net>
Tue, 16 Jul 2019 15:21:59 +0000 (01:21 +1000)
qcsrc/common/turrets/sv_turrets.qc

index 18197c078373f749c8d3127cc10f68396600889a..84aae19335fd0d970a32a2024090780e16c3d372 100644 (file)
@@ -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
                }
        }