bot: fix: blind navigation interruption (thanks @spodlesniy )

This commit is contained in:
jeefo 2023-06-09 20:23:54 +03:00
commit 132e1b1585
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED

View file

@ -496,7 +496,7 @@ void Bot::blind_ () {
if (m_difficulty >= Difficulty::Normal && graph.exists (m_blindNodeIndex)) { if (m_difficulty >= Difficulty::Normal && graph.exists (m_blindNodeIndex)) {
if (updateNavigation ()) { if (updateNavigation ()) {
if (m_blindTime >= game.time ()) { if (m_blindTime < game.time ()) {
completeTask (); completeTask ();
} }
m_prevGoalIndex = kInvalidNodeIndex; m_prevGoalIndex = kInvalidNodeIndex;
@ -522,9 +522,7 @@ void Bot::blind_ () {
m_strafeSpeed = m_blindSidemoveSpeed; m_strafeSpeed = m_blindSidemoveSpeed;
pev->button |= m_blindButton; pev->button |= m_blindButton;
if (m_states & Sense::SuspectEnemy) { m_states |= Sense::SuspectEnemy;
m_states |= Sense::SuspectEnemy;
}
} }
if (m_blindTime < game.time ()) { if (m_blindTime < game.time ()) {