]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/fruitiex/bots'
authorRudolf Polzer <divverent@alientrap.org>
Tue, 28 Dec 2010 13:07:07 +0000 (14:07 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 28 Dec 2010 13:07:07 +0000 (14:07 +0100)
defaultXonotic.cfg
qcsrc/server/bot/aim.qc
qcsrc/server/bot/havocbot/havocbot.qc

index 686d898ec96340ccd09e97824f842921d67cf973..8e27bff243a33caa562fed70eee21909a508eca2 100644 (file)
@@ -401,16 +401,16 @@ seta bot_suffix ""        "Suffix behind the bot names"
 seta skill_auto 0      "when 1, \"skill\" gets adjusted to match the best player on the map"
 // general bot AI cvars
 set bot_ai_thinkinterval 0.05
-set bot_ai_strategyinterval 3 "How often a new objective is chosen"
-set bot_ai_enemydetectioninterval 0.5 "How often bots pick a new target"
+set bot_ai_strategyinterval 5 "How often a new objective is chosen"
+set bot_ai_enemydetectioninterval 3 "How often bots pick a new target"
 set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
-set bot_ai_dodgeupdateinterval 0.1 "How often scan for items to dodge. Currently not in use."
-set bot_ai_chooseweaponinterval 0.3 "How often the best weapon according to the situation will be chosen"
-set bot_ai_dangerdetectioninterval 0.1 "How often scan for waypoints with dangers near"
+set bot_ai_dodgeupdateinterval 0.2 "How often scan for items to dodge. Currently not in use."
+set bot_ai_chooseweaponinterval 0.5 "How often the best weapon according to the situation will be chosen"
+set bot_ai_dangerdetectioninterval 0.25 "How often scan for waypoints with dangers near"
 set bot_ai_dangerdetectionupdates 64 "How many waypoints will be considered for danger detection"
 set bot_ai_aimskill_blendrate 2        "How much correction will be applied to the aiming angle"
 set bot_ai_aimskill_fixedrate 15
-set bot_ai_aimskill_firetolerance_distdegrees 180
+set bot_ai_aimskill_firetolerance_distdegrees 100
 set bot_ai_aimskill_firetolerance_mindegrees 2 "Minimum angle tolerance. Used on large distances"
 set bot_ai_aimskill_firetolerance_maxdegrees 60 "Maximum firing angle. Used on close range"
 set bot_ai_aimskill_mouse 1 "How much of the aiming filters are applied"
@@ -423,13 +423,13 @@ set bot_ai_custom_weapon_priority_far   "minstanex nex sniperrifle electro rocke
 set bot_ai_custom_weapon_priority_mid   "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi sniperrifle crylink hlac hagar shotgun laser tuba minelayer" "Desired weapons for middle distances ordered by priority"
 set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro sniperrifle rocketlauncher laser fireball minelayer" "Desired weapons for close distances ordered by priority"
 set bot_ai_weapon_combo 1      "Enable bots to do weapon combos"
-set bot_ai_weapon_combo_threshold 0.3  "Try to make a combo N seconds after the last attack"
+set bot_ai_weapon_combo_threshold 0.4  "Try to make a combo N seconds after the last attack"
 set bot_ai_friends_aware_pickup_radius "500"   "Bots will not pickup items if a team mate is this distance near the item"
 set bot_ai_ignoregoal_timeout 3        "Ignore goals making bots to get stuck in front of a wall for N seconds"
 set bot_ai_bunnyhop_skilloffset 7      "Bots with skill equal or greater than this value will perform the  \"bunnyhop\" technique"
-set bot_ai_bunnyhop_startdistance 250 "Run to goals located further than this distance"
-set bot_ai_bunnyhop_stopdistance 220 "Stop jumping after reaching this distance to the goal"
-set bot_ai_bunnyhop_firstjumpdelay 0.5 "Start running to the goal only if it was seen for more than N seconds"
+set bot_ai_bunnyhop_startdistance 100 "Run to goals located further than this distance"
+set bot_ai_bunnyhop_stopdistance 125 "Stop jumping after reaching this distance to the goal"
+set bot_ai_bunnyhop_firstjumpdelay 0.2 "Start running to the goal only if it was seen for more than N seconds"
 set bot_god 0 "god mode for bots"
 set bot_ai_navigation_jetpack 0 "Enable bots to navigat maps using the jetpack"
 set bot_ai_navigation_jetpack_mindistance 3500 "Bots will try fly to objects located farther than this distance"
index 1911daf9e6a3ad2f5504995fac11f68b3256f5f1..9ef109e2b585e3c76053c7b183fbc49da22543ff 100644 (file)
@@ -353,18 +353,19 @@ float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float a
        {
                f = bot_aimdir(v - shotorg, r);
                //dprint("AIM: ");dprint(vtos(self.bot_aimtargorigin));dprint(" + ");dprint(vtos(self.bot_aimtargvelocity));dprint(" * ");dprint(ftos(self.bot_aimlatency + vlen(self.bot_aimtargorigin - shotorg) / shotspeed));dprint(" = ");dprint(vtos(v));dprint(" : aimdir = ");dprint(vtos(normalize(v - shotorg)));dprint(" : ");dprint(vtos(shotdir));dprint("\n");
-               traceline(shotorg, shotorg + shotdir * 10000, FALSE, self);
-               if (trace_ent.takedamage)
-               if (trace_fraction < 1)
-               if (!bot_shouldattack(trace_ent))
-                       return FALSE;
+               //traceline(shotorg, shotorg + shotdir * 10000, FALSE, self);
+               //if (trace_ent.takedamage)
+               //if (trace_fraction < 1)
+               //if (!bot_shouldattack(trace_ent))
+               //      return FALSE;
                traceline(shotorg, self.bot_aimtargorigin, FALSE, self);
                if (trace_fraction < 1)
                if (trace_ent != self.enemy)
                if (!bot_shouldattack(trace_ent))
                        return FALSE;
        }
-       if (r > maxshottime * shotspeed)
-               return FALSE;
-       return f;
+
+       //if (r > maxshottime * shotspeed)
+       //      return FALSE;
+       return TRUE;
 };
index c685735ac84b25e298a2a81a4a0dfb0b3ed6bbc0..f71df778dad283a245f63a2ade567cad9e9f9d72 100644 (file)
@@ -232,12 +232,14 @@ void havocbot_bunnyhop(vector dir)
                return;
 
        // Don't jump when using some weapons
+       /*
        if(self.aistatus & AI_STATUS_ATTACKING)
        if(self.weapon == WEP_SNIPERRIFLE)
                return;
 
        if(self.goalcurrent.classname == "player")
                return;
+       */
 
        maxspeed = autocvar_sv_maxspeed;
 
@@ -338,6 +340,7 @@ void havocbot_bunnyhop(vector dir)
        }
 
        // Release jump button
+       if(!cvar("sv_pogostick"))
        if(self.flags & FL_ONGROUND == 0)
        {
                if(self.velocity_z < 0 || vlen(self.velocity)<maxspeed)
@@ -1184,7 +1187,6 @@ vector havocbot_dodge()
 {
        // LordHavoc: disabled because this is too expensive
        return '0 0 0';
-       /*
        local entity head;
        local vector dodge, v, n;
        local float danger, bestdanger, vl, d;
@@ -1229,5 +1231,4 @@ vector havocbot_dodge()
                head = head.chain;
        }
        return dodge;
-       */
 };