refactor: remove ignore fov parameter from enemy see check
This commit is contained in:
parent
7bc1704d6a
commit
aef3ff0b36
2 changed files with 3 additions and 3 deletions
|
|
@ -417,7 +417,7 @@ private:
|
||||||
bool isWeaponRestrictedAMX (int weaponIndex);
|
bool isWeaponRestrictedAMX (int weaponIndex);
|
||||||
bool isInViewCone (const Vector &origin);
|
bool isInViewCone (const Vector &origin);
|
||||||
bool checkBodyParts (edict_t *target);
|
bool checkBodyParts (edict_t *target);
|
||||||
bool seesEnemy (edict_t *player, bool ignoreFOV = false);
|
bool seesEnemy (edict_t *player);
|
||||||
bool hasActiveGoal ();
|
bool hasActiveGoal ();
|
||||||
bool advanceMovement ();
|
bool advanceMovement ();
|
||||||
bool isBombDefusing (const Vector &bombOrigin);
|
bool isBombDefusing (const Vector &bombOrigin);
|
||||||
|
|
|
||||||
|
|
@ -207,12 +207,12 @@ bool Bot::checkBodyParts (edict_t *target) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Bot::seesEnemy (edict_t *player, bool ignoreFOV) {
|
bool Bot::seesEnemy (edict_t *player) {
|
||||||
if (game.isNullEntity (player)) {
|
if (game.isNullEntity (player)) {
|
||||||
return false;
|
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_seeEnemyTime = game.time ();
|
||||||
m_lastEnemy = player;
|
m_lastEnemy = player;
|
||||||
m_lastEnemyOrigin = m_enemyOrigin;
|
m_lastEnemyOrigin = m_enemyOrigin;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue