]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/havocbot/role_onslaught.qc
Merge remote-tracking branch 'origin/master' into samual/mutator_ctf
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / havocbot / role_onslaught.qc
index 90150e2ab3c4d027b6219c905497ea821563c858..b17697d2f8524d6ae21bc3c9dee8205161a07cf3 100644 (file)
@@ -28,13 +28,14 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplay
 void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float sradius)
 {
        entity head;
-       float t, i, c, needarmor, needweapons;
+       float t, i, c, needarmor = FALSE, needweapons = FALSE;
 
        // Needs armor/health?
        if(self.health<100)
                needarmor = TRUE;
 
        // Needs weapons?
+       c = 0;
        for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
        {
                // Find weapon
@@ -98,7 +99,7 @@ void havocbot_role_ons_setrole(entity bot, float role)
 
 float havocbot_ons_teamcount(entity bot, float role)
 {
-       float c;
+       float c = 0;
        entity head;
 
        FOR_EACH_PLAYER(head)
@@ -152,6 +153,7 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale)
 
        // We'll consider only the best case
        bestvalue = 99999999999;
+       cp = world;
        for (; cp1; cp1 = cp1.chain)
        {
                if not(cp1.wpconsidered)