diff --git a/src/botlib.cpp b/src/botlib.cpp index b94921c..945b6c9 100644 --- a/src/botlib.cpp +++ b/src/botlib.cpp @@ -3688,7 +3688,7 @@ void Bot::camp_ () { } else { if ((!game.isNullEntity (m_lastEnemy) && !m_lastEnemyOrigin.empty ()) || util.isAlive (m_lastEnemy)) { - auto lastEnemyNearestIndex = graph.getNearest (m_lastEnemy->v.origin); + auto lastEnemyNearestIndex = findAimingNode (m_lastEnemyOrigin); if (lastEnemyNearestIndex != kInvalidNodeIndex && graph.isVisible (m_currentNodeIndex, lastEnemyNearestIndex)) { m_camp = graph[lastEnemyNearestIndex].origin;