fix: do rotation instantly, and not on round start

so it works on infinite round like in csdm
This commit is contained in:
jeefo 2023-03-25 05:01:58 +03:00
commit 19c5e6dd4d
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
3 changed files with 9 additions and 8 deletions

View file

@ -3001,6 +3001,14 @@ void Bot::frame () {
showChaterIcon (false); // end voice feedback
}
// kick the bot if stay time is over, the quota maintain will add new bot for us later
if (cv_rotate_bots.bool_ () && m_stayTime < game.time ()) {
m_kickedByRotation = true; // kicked by roration, so not save bot name if save bot names is active
kick ();
return;
}
// clear enemy far away
if (!m_lastEnemyOrigin.empty () && !game.isNullEntity (m_lastEnemy) && pev->origin.distanceSq (m_lastEnemyOrigin) >= cr::square (1600.0f)) {
m_lastEnemy = nullptr;