]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/havocbot/role_onslaught.qc
Merge remote-tracking branch 'origin/divVerent/allow-override-item-model'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / havocbot / role_onslaught.qc
index 3268daefa5a5ae601056dc02a1b6d6142ee3662f..3ae7379be757278c00478a55b39854b410027096 100644 (file)
@@ -27,15 +27,15 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplay
 
 void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float sradius)
 {
-       local entity head;
-       local float t, i, c, needarmor, needweapons;
+       entity head;
+       float t, i, c, needarmor, needweapons;
 
        // Needs armor/health?
        if(self.health<100)
                needarmor = TRUE;
 
        // Needs weapons?
-       for(i = WEP_FIRST; i < WEP_LAST ; ++i)
+       for(i = WEP_FIRST; i <= WEP_LAST ; ++i)
        {
                // Find weapon
                if(power2of(i-1) & self.weapons)
@@ -67,7 +67,7 @@ void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float s
                }
                head = head.chain;
        }
-};
+}
 
 void havocbot_role_ons_setrole(entity bot, float role)
 {
@@ -94,12 +94,12 @@ void havocbot_role_ons_setrole(entity bot, float role)
                        break;
        }
        dprint("\n");
-};
+}
 
 float havocbot_ons_teamcount(entity bot, float role)
 {
-       local float c;
-       local entity head;
+       float c;
+       entity head;
 
        FOR_EACH_PLAYER(head)
        if(head.team==self.team)
@@ -107,7 +107,7 @@ float havocbot_ons_teamcount(entity bot, float role)
                ++c;
 
        return c;
-};
+}
 
 void havocbot_goalrating_ons_controlpoints_attack(float ratingscale)
 {
@@ -231,12 +231,12 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale)
                if not(found)
                        navigation_routerating(cp, ratingscale, 10000);
        }
-};
+}
 
 float havocbot_goalrating_ons_generator_attack(float ratingscale)
 {
-       local entity g, wp, bestwp;
-       local float found, best;
+       entity g, wp, bestwp;
+       float found, best;
 
        for (g = findchain(classname, "onslaught_generator"); g; g = g.chain)
        {
@@ -286,7 +286,7 @@ float havocbot_goalrating_ons_generator_attack(float ratingscale)
                }
        }
        return FALSE;
-};
+}
 
 void havocbot_role_ons_offense()
 {
@@ -319,24 +319,24 @@ void havocbot_role_ons_offense()
                havocbot_goalrating_ons_offenseitems(10000, self.origin, 10000);
                navigation_goalrating_end();
 
-               self.bot_strategytime = time + cvar("bot_ai_strategyinterval");
+               self.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
        }
-};
+}
 
 void havocbot_role_ons_assistant()
 {
        havocbot_ons_reset_role(self);
-};
+}
 
 void havocbot_role_ons_defense()
 {
        havocbot_ons_reset_role(self);
-};
+}
 
 void havocbot_ons_reset_role(entity bot)
 {
-       local entity head;
-       local float c;
+       entity head;
+       float c;
 
        if(self.deadflag != DEAD_NO)
                return;
@@ -358,9 +358,9 @@ void havocbot_ons_reset_role(entity bot)
        }
 
        havocbot_role_ons_setrole(bot, HAVOCBOT_ONS_ROLE_OFFENSE);
-};
+}
 
 void havocbot_chooserole_ons()
 {
        havocbot_ons_reset_role(self);
-};
+}