fix: condition order for creatures in task filtering (resolves #583)
This commit is contained in:
parent
61036ecadc
commit
3a026b1d4b
1 changed files with 3 additions and 3 deletions
|
|
@ -2028,6 +2028,9 @@ void Bot::filterTasks () {
|
||||||
const bool lowAmmo = isLowOnAmmo (m_currentWeapon, 0.18f);
|
const bool lowAmmo = isLowOnAmmo (m_currentWeapon, 0.18f);
|
||||||
const bool sniping = m_sniperStopTime > game.time () && lowAmmo;
|
const bool sniping = m_sniperStopTime > game.time () && lowAmmo;
|
||||||
|
|
||||||
|
if (m_isCreature) {
|
||||||
|
ratio = 0.0f;
|
||||||
|
}
|
||||||
if (bots.isBombPlanted () || m_isStuck || usesKnife ()) {
|
if (bots.isBombPlanted () || m_isStuck || usesKnife ()) {
|
||||||
ratio /= 3.0f; // reduce the seek cover desire if bomb is planted
|
ratio /= 3.0f; // reduce the seek cover desire if bomb is planted
|
||||||
}
|
}
|
||||||
|
|
@ -2037,9 +2040,6 @@ void Bot::filterTasks () {
|
||||||
else if (m_lastEnemyOrigin.distanceSq2d (pev->origin) < cr::sqrf (200.0f)) {
|
else if (m_lastEnemyOrigin.distanceSq2d (pev->origin) < cr::sqrf (200.0f)) {
|
||||||
ratio *= 3.0f;
|
ratio *= 3.0f;
|
||||||
}
|
}
|
||||||
else if (m_isCreature) {
|
|
||||||
ratio = 0.0f;
|
|
||||||
}
|
|
||||||
else if (game.is (GameFlags::CSDM)) {
|
else if (game.is (GameFlags::CSDM)) {
|
||||||
ratio = 0.0f;
|
ratio = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue