combat: do not throw any grenades if just saw enemy

This commit is contained in:
jeefo 2024-03-04 11:29:04 +03:00
commit a94886f8f7
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED

View file

@ -2042,8 +2042,8 @@ void Bot::checkGrenadesThrow () {
distanceSq = kInfiniteDistance;
}
// don't throw away HE's if just seen the enemy
if (!isGrenadeMode && grenadeToThrow == Weapon::Explosive && m_seeEnemyTime + kGrenadeCheckTime * 0.2f < game.time ()) {
// don't throw away nades if just seen the enemy
if (!isGrenadeMode && m_seeEnemyTime + kGrenadeCheckTime * 0.2f < game.time ()) {
distanceSq = kInfiniteDistance;
}