fix: bots do not look at the wall while camping. (solves #303)
This commit is contained in:
parent
10db943cdf
commit
07a8a5c81e
1 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue