diff --git a/src/botlib.cpp b/src/botlib.cpp index 919ffb1..7dfa2c6 100644 --- a/src/botlib.cpp +++ b/src/botlib.cpp @@ -3687,7 +3687,16 @@ void Bot::camp_ () { } } else { - m_camp = graph[findCampingDirection ()].origin; + if (!game.isNullEntity (m_lastEnemy)) { + auto lastEnemyNearestIndex = graph.getNearest (m_lastEnemy->v.origin); + + if (!util.isAlive (m_lastEnemy) && rg.get (1, 3) == 1 && graph.isVisible (m_currentNodeIndex, lastEnemyNearestIndex)) { + m_camp = graph[lastEnemyNearestIndex].origin; + } + } + else { + m_camp = graph[findCampingDirection ()].origin; + } } } // press remembered crouch button