diff --git a/inc/yapb.h b/inc/yapb.h index ca1f928..48e8377 100644 --- a/inc/yapb.h +++ b/inc/yapb.h @@ -417,7 +417,7 @@ private: bool isWeaponRestrictedAMX (int weaponIndex); bool isInViewCone (const Vector &origin); bool checkBodyParts (edict_t *target); - bool seesEnemy (edict_t *player, bool ignoreFOV = false); + bool seesEnemy (edict_t *player); bool hasActiveGoal (); bool advanceMovement (); bool isBombDefusing (const Vector &bombOrigin); diff --git a/src/combat.cpp b/src/combat.cpp index 6cf551e..ce24def 100644 --- a/src/combat.cpp +++ b/src/combat.cpp @@ -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;