bot: added basic support for zombie plague warmup mode

Controllable via yb_ignore_enemies_after_spawn_time, and automatically set from zp_delay cvar.
This commit is contained in:
jeefo 2024-02-15 05:42:52 +03:00
commit 7b7ae7020b
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
5 changed files with 20 additions and 3 deletions

View file

@ -1463,7 +1463,6 @@ void Bot::newRound () {
m_buttonPushTime = 0.0f;
m_enemyUpdateTime = 0.0f;
m_enemyIgnoreTimer = 0.0f;
m_retreatTime = 0.0f;
m_seeEnemyTime = 0.0f;
m_shootAtDeadTime = 0.0f;
@ -1582,6 +1581,14 @@ void Bot::newRound () {
m_goalHist.clear ();
m_ignoredBreakable.clear ();
// ignore enemies for some time if needed
if (cv_ignore_enemies_after_spawn_time.float_ () > 0.0f) {
m_enemyIgnoreTimer = game.time () + cv_ignore_enemies_after_spawn_time.float_ ();
}
else {
m_enemyIgnoreTimer = 0.0f;
}
// update refvec for blocked movement
updateRightRef ();