]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix ka bot logic bug where it was rated route to either the ball owner and the ball...
authorterencehill <piuntn@gmail.com>
Wed, 15 Jul 2015 16:45:51 +0000 (18:45 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 15 Jul 2015 16:45:51 +0000 (18:45 +0200)
qcsrc/server/mutators/gamemode_keepaway.qc

index 6b62e7da1b65d7bda40c0e618cb12bbddd7d3c17..1a91658a66f64ba47a269ce14115383df8e9f8b7 100644 (file)
@@ -192,9 +192,8 @@ void havocbot_goalrating_ball(float ratingscale, vector org)
                t = (self.health + self.armorvalue) / (ball_owner.health + ball_owner.armorvalue);
                navigation_routerating(ball_owner, t * ratingscale, 2000);
        }
-
-       // Ball has been dropped so collect.
-       navigation_routerating(ka_ball, ratingscale, 2000);
+       else // Ball has been dropped so collect.
+               navigation_routerating(ka_ball, ratingscale, 2000);
 }
 
 void havocbot_role_ka_carrier()