bot: some reverts and fixes to the pr

This commit is contained in:
jeefo 2024-05-02 20:26:37 +03:00
commit dca15519b7
5 changed files with 47 additions and 3 deletions

View file

@ -91,7 +91,7 @@ void Bot::avoidGrenades () {
}
// check if visible to the bot
if (!seesEntity (pent->v.origin) && isInFOV (pent->v.origin - getEyesPos ()) > pev->fov * 0.5f) {
if (isInFOV (pent->v.origin - getEyesPos ()) > pev->fov * 0.5f && !seesEntity (pent->v.origin)) {
continue;
}
auto model = pent->v.model.str (9);
@ -3219,7 +3219,7 @@ void Bot::logic () {
}
// ensure we're not stuck destroying/picking something
if (m_navTimeset + getEstimatedNodeReachTime () < game.time () && !(m_states & Sense::SeeingEnemy) && m_moveToGoal) {
if (m_navTimeset + getEstimatedNodeReachTime () + 1.0f < game.time () && !(m_states & Sense::SeeingEnemy) && m_moveToGoal) {
ensureEntitiesClear ();
}