aim: use aiming node instead of nearest to predict enemy position (suggested by @commandcobra7)
This commit is contained in:
parent
4160aa585d
commit
1debbe3654
1 changed files with 1 additions and 1 deletions
|
|
@ -3688,7 +3688,7 @@ void Bot::camp_ () {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((!game.isNullEntity (m_lastEnemy) && !m_lastEnemyOrigin.empty ()) || util.isAlive (m_lastEnemy)) {
|
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)) {
|
if (lastEnemyNearestIndex != kInvalidNodeIndex && graph.isVisible (m_currentNodeIndex, lastEnemyNearestIndex)) {
|
||||||
m_camp = graph[lastEnemyNearestIndex].origin;
|
m_camp = graph[lastEnemyNearestIndex].origin;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue