#include <server/weapons/accuracy.qh>
#include <server/weapons/selection.qh>
#include <server/world.qh>
+#include <server/command/vote.qh>
STATIC_INIT(bot) { bot_calculate_stepheightvec(); }
else if(this.aistatus & AI_STATUS_STUCK)
navigation_unstuck(this);
+ if (warmup_stage && !this.ready)
+ {
+ this.ready = true;
+ ReadyCount(); // this must be delayed until the bot has spawned
+ }
+
// now call the current bot AI (havocbot for example)
this.bot_ai(this);
}
for (i = 1; i <= maxclients; i += 8)
{
for (f = 0, e = edict_num(i), b = BIT(0); b < BIT(8); b <<= 1, e = nextent(e))
- if (!IS_REAL_CLIENT(e) || e.ready)
+ if (e.ready)
f |= b;
WriteByte(MSG_ENTITY, f);
}
if(!is_fake_round_start && !warmup_stage)
localcmd("\nsv_hook_warmupend\n");
- // reset the .ready status of all players (also spectators)
- FOREACH_CLIENT(IS_REAL_CLIENT(it), { it.ready = false; });
+ // reset the .ready status of all clients (including spectators and bots)
+ FOREACH_CLIENT(true, { it.ready = false; });
readycount = 0;
Nagger_ReadyCounted(); // NOTE: this causes a resend of that entity, and will also turn off warmup state on the client
const float RESTART_COUNTDOWN = 10;
entity nagger;
int readycount; // amount of players who are ready
-.float ready; // flag for if a player is ready
+.bool ready; // flag for if a player is ready
.float last_ready; // last ready time for anti-spam
.int team_saved; // team number to restore upon map reset
.void(entity this) reset; // if set, an entity is reset using this