refactor: remove ignore fov parameter from enemy see check

This commit is contained in:
jeefo 2023-06-27 09:45:04 +03:00
commit aef3ff0b36
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
2 changed files with 3 additions and 3 deletions

View file

@ -207,12 +207,12 @@ bool Bot::checkBodyParts (edict_t *target) {
return false;
}
bool Bot::seesEnemy (edict_t *player, bool ignoreFOV) {
bool Bot::seesEnemy (edict_t *player) {
if (game.isNullEntity (player)) {
return false;
}
if ((ignoreFOV || isInViewCone (player->v.origin)) && isEnemyInFrustum (player) && checkBodyParts (player)) {
if (isEnemyInFrustum (player) && isInViewCone (player->v.origin) && checkBodyParts (player)) {
m_seeEnemyTime = game.time ();
m_lastEnemy = player;
m_lastEnemyOrigin = m_enemyOrigin;