entity bot = spawnclient();
if (bot)
{
+ setItemGroupCount();
currentbots = currentbots + 1;
bot_setnameandstuff(bot);
ClientConnect(bot);
if(autocvar_bot_god)
this.flags |= FL_GODMODE;
- this.bot_nextthink = this.bot_nextthink + autocvar_bot_ai_thinkinterval * pow(0.5, this.bot_aiskill);
- if(this.bot_nextthink < time)
- this.bot_nextthink = time + autocvar_bot_ai_thinkinterval * pow(0.5, this.bot_aiskill);
+ this.bot_nextthink = max(time, this.bot_nextthink) + max(0.01, autocvar_bot_ai_thinkinterval * pow(0.5, this.bot_aiskill) * min(14 / (skill + 14), 1));
+
//if (this.bot_painintensity > 0)
// this.bot_painintensity = this.bot_painintensity - (skill + 1) * 40 * frametime;
prio = 6;
- #define READSKILL(f,w,r) if(argv(prio) != "") this.f = stof(argv(prio)) * (w); else this.f = (!autocvar_g_campaign) * (2 * random() - 1) * (r) * (w); ++prio
+ #define READSKILL(f, w, r) MACRO_BEGIN { \
+ if(argv(prio) != "") \
+ this.f = stof(argv(prio)) * w; \
+ else \
+ this.f = (!autocvar_g_campaign) * (2 * random() - 1) * r * w; \
+ prio++; \
+ } MACRO_END
//print(bot_name, ": ping=", argv(9), "\n");
READSKILL(havocbot_keyboardskill, 0.5, 0.5); // keyboard skill