fix: bots use buttons too extensively
nav: added more cpu-friendly version to check if bot will fall in combat
This commit is contained in:
parent
0873975678
commit
6e09cee0ee
6 changed files with 54 additions and 37 deletions
|
|
@ -1962,12 +1962,7 @@ void Bot::filterTasks () {
|
|||
filter[Task::PickupItem].desire = 50.0f; // always pickup button
|
||||
}
|
||||
else {
|
||||
float distance = (500.0f - pev->origin.distance (game.getEntityOrigin (m_pickupItem))) * 0.2f;
|
||||
|
||||
if (distance > 50.0f) {
|
||||
distance = 50.0f;
|
||||
}
|
||||
filter[Task::PickupItem].desire = distance;
|
||||
filter[Task::PickupItem].desire = cr::max (50.0f, 500.0f - pev->origin.distance (game.getEntityOrigin (m_pickupItem)) * 0.2f);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue