From: FruitieX Date: Thu, 18 Nov 2010 16:27:37 +0000 (+0200) Subject: random, weird, bot "fixes"/hacks X-Git-Tag: xonotic-v0.5.0~330^2~14^2~5^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ac33435fe636aaad7210e1a8f9f723f6134a7823;p=xonotic%2Fxonotic-data.pk3dir.git random, weird, bot "fixes"/hacks --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 1da4d9435..1463eda48 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -407,16 +407,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" @@ -429,13 +429,13 @@ set bot_ai_custom_weapon_priority_far "minstanex nex campingrifle rocketlaunch set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker minelayer grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba" "Desired weapons for middle distances ordered by priority" set bot_ai_custom_weapon_priority_close "minstanex nex uzi hlac tuba seeker hagar crylink minelayer grenadelauncher shotgun electro campingrifle rocketlauncher laser fireball" "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" diff --git a/qcsrc/server/bot/aim.qc b/qcsrc/server/bot/aim.qc index d1c9a5a40..43398b3d9 100644 --- a/qcsrc/server/bot/aim.qc +++ b/qcsrc/server/bot/aim.qc @@ -349,18 +349,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; }; diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index 934aba87d..442711514 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -231,12 +231,14 @@ void havocbot_bunnyhop(vector dir) return; // Don't jump when using some weapons + /* if(self.aistatus & AI_STATUS_ATTACKING) if(self.weapon & WEP_CAMPINGRIFLE) return; if(self.goalcurrent.classname == "player") return; + */ maxspeed = cvar("sv_maxspeed"); @@ -337,6 +339,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)