aim: add more fail conditions t to fail enemy prediction

bot: allow to disable think-per-frame optimization on xash3d completely, to reduce view-lags. (controlled via  cv_think_fps_disable
This commit is contained in:
jeefo 2023-06-24 21:38:34 +03:00
commit c1d045828e
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
4 changed files with 22 additions and 6 deletions

View file

@ -1266,6 +1266,11 @@ void Bot::attackMovement () {
if (m_difficulty >= Difficulty::Normal && (m_jumpTime + 5.0f < game.time () && isOnFloor () && rg.get (0, 1000) < (m_isReloading ? 8 : 2) && pev->velocity.length2d () > 150.0f) && !usesSniper ()) {
pev->button |= IN_JUMP;
}
// do not move forward/backward is too far
if (distance > 1024.0) {
m_moveSpeed = 0.0f;
}
}
else if (m_fightStyle == Fight::Stay) {
const bool alreadyDucking = m_duckTime > game.time () || isDucking ();