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

@ -631,6 +631,14 @@ void Bot::camp_ () {
if (pathLength > 1 && graph.exists (predictNode)) {
m_lookAtSafe = graph[predictNode].origin + pev->view_ofs;
}
else {
pathLength = 0;
predictNode = findAimingNode (m_lastEnemyOrigin, pathLength);
if (pathLength > 1 && graph.exists (predictNode)) {
m_lookAtSafe = graph[predictNode].origin + pev->view_ofs;
}
}
}
else {
m_lookAtSafe = graph[getRandomCampDir ()].origin + pev->view_ofs;