set bot_wander_enable 1 "Have bots wander around if they are unable to reach any useful goal. Disable only for debugging purposes."
// general bot AI cvars
set bot_ai_thinkinterval 0.05
-set bot_ai_strategyinterval 5 "How often a new objective is chosen"
-set bot_ai_strategyinterval_movingtarget 3.5 "How often a new objective is chosen when current objective can move"
+set bot_ai_strategyinterval 7 "How often a new objective is chosen"
+set bot_ai_strategyinterval_movingtarget 5.5 "How often a new objective is chosen when current objective can move"
set bot_ai_enemydetectioninterval 2 "How often bots pick a new target"
set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
set bot_ai_dodgeupdateinterval 0.2 "How often scan for items to dodge. Currently not in use."
}
if(!locked_goal)
{
- if(navigation_poptouchedgoals(this) && this.bot_strategytime < time + 1)
+ if(navigation_poptouchedgoals(this) && time > this.bot_strategytime - (IS_MOVABLE(this.goalentity) ? 3 : 2))
navigation_goalrating_timeout_force(this);
}
void navigation_goalrating_timeout_set(entity this)
{
- if((IS_PLAYER(this.goalentity) || IS_MONSTER(this.goalentity)) && !STAT(FROZEN, this.goalentity))
+ if(IS_MOVABLE(this.goalentity))
this.bot_strategytime = time + autocvar_bot_ai_strategyinterval_movingtarget;
else
this.bot_strategytime = time + autocvar_bot_ai_strategyinterval;
#define IS_VEHICLE(v) (v.vehicle_flags & VHF_ISVEHICLE)
#define IS_TURRET(v) (v.turret_flags & TUR_FLAG_ISTURRET)
+#define IS_MOVABLE(v) (((IS_PLAYER(v) || IS_MONSTER(v)) && !STAT(FROZEN, v)) || IS_VEHICLE(v))
+
// NOTE: FOR_EACH_CLIENTSLOT deprecated! Use the following instead: FOREACH_CLIENTSLOT(true, { code; });
// NOTE: FOR_EACH_CLIENT deprecated! Use the following instead: FOREACH_CLIENT(true, { code; });
// NOTE: FOR_EACH_REALCLIENT deprecated! Use the following instead: FOREACH_CLIENT(IS_REAL_CLIENT(it), { code; });