From 71b533c34479fdfae7ac02d0c7f6891fdb6774c6 Mon Sep 17 00:00:00 2001 From: mand1nga Date: Fri, 13 Feb 2009 20:38:16 +0000 Subject: [PATCH] Bots: Removed bot_ai_facingwall_timeout as its not worth to have it. Some other minor fixes. git-svn-id: svn://svn.icculus.org/nexuiz/trunk@5873 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/defaultNexuiz.cfg | 3 +-- data/qcsrc/server/havocbot.qc | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/data/defaultNexuiz.cfg b/data/defaultNexuiz.cfg index 34a9be123..0ffb4e7fe 100644 --- a/data/defaultNexuiz.cfg +++ b/data/defaultNexuiz.cfg @@ -360,8 +360,7 @@ set bot_ai_custom_weapon_priority_close "11 3 13 14 8 6 4 2 5 7 15 1" "Desired w 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_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item" -set bot_ai_facingwall_timeout 0.05 "Consider the bot to being stuck after N seconds facing and touching a wall" -set bot_ai_ignoregoal_timeout 3 "Ignore goals leading the bots to stuck in front of a wall for N seconds" +set bot_ai_ignoregoal_timeout 3 "Ignore goals making bots to get stuck in front of a wall for N seconds" // Better don't touch these, there are hard to tweak! set bot_ai_aimskill_order_mix_1st 0.01 set bot_ai_aimskill_order_mix_2nd 0.1 diff --git a/data/qcsrc/server/havocbot.qc b/data/qcsrc/server/havocbot.qc index c60281585..21efdb382 100644 --- a/data/qcsrc/server/havocbot.qc +++ b/data/qcsrc/server/havocbot.qc @@ -240,7 +240,7 @@ void havocbot_movetogoal() traceline(self.origin + self.view_ofs , dst_ahead, TRUE, world); // Check head-banging against walls - if(vlen(self.origin + self.view_ofs - trace_endpos) < 1.5) + if(vlen(self.origin + self.view_ofs - trace_endpos) < 2) { if(self.facingwalltime && time > self.facingwalltime) { @@ -250,15 +250,14 @@ void havocbot_movetogoal() } else { - self.facingwalltime = time + cvar("bot_ai_facingwall_timeout"); + self.facingwalltime = time + 0.05; } } else { - if(!self.ignoregoaltime) - self.facingwalltime = 0; + self.facingwalltime = 0; - if(time > self.ignoregoaltime) + if(self.ignoregoal != world && time > self.ignoregoaltime) { self.ignoregoal = world; self.ignoregoaltime = 0; -- 2.39.2