fix: bots doesn't forgets unreachable items (ref #589)

crlib: update submodule
This commit is contained in:
jeefo 2024-07-03 09:52:52 +03:00
commit 26e374d3f5
No known key found for this signature in database
GPG key ID: D696786B81B667C8
2 changed files with 3 additions and 2 deletions

View file

@ -3320,7 +3320,8 @@ void Bot::logic () {
}
// ensure we're not stuck destroying/picking something
if (m_navTimeset + getEstimatedNodeReachTime () + 1.0f < game.time () && !(m_states & Sense::SeeingEnemy) && m_moveToGoal) {
if (m_moveToGoal && rg (2.0f, 3.0f) + m_navTimeset + m_destOrigin.distanceSq2d (pev->origin) / m_moveSpeed < game.time ()
&& !(m_states & Sense::SeeingEnemy)) {
ensureEntitiesClear ();
}