]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot AI: fix incorrect rating of own team's flag carrier
authorterencehill <piuntn@gmail.com>
Sat, 9 Jun 2018 12:59:49 +0000 (14:59 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 9 Jun 2018 12:59:49 +0000 (14:59 +0200)
qcsrc/server/mutators/mutator/gamemode_ctf.qc

index 1b10acca24387e40093a383c630655ed96935ec2..1b3e54407e181c82ed2c4ec7f26e0711ce6aa913 100644 (file)
@@ -1513,7 +1513,11 @@ void havocbot_goalrating_ctf_enemyflag(entity this, float ratingscale)
                head = head.ctf_worldflagnext;
        }
        if (head)
+       {
+               if (head.ctf_status == FLAG_CARRY)
+                       head = head.tag_entity;
                navigation_routerating(this, head, ratingscale, 10000);
+       }
 }
 
 void havocbot_goalrating_ctf_enemybase(entity this, float ratingscale)