Completely remove of engine-based visibility checks. This reduces CPU usage when bot searching for enemies.
This commit is contained in:
parent
fc77e39595
commit
60556a0e4c
2 changed files with 2 additions and 29 deletions
|
|
@ -238,16 +238,6 @@ bool Bot::LookupEnemy (void)
|
|||
// ignore shielded enemies, while we have real one
|
||||
edict_t *shieldEnemy = nullptr;
|
||||
|
||||
#if 0
|
||||
// setup potentially visible set for this bot
|
||||
Vector potentialVisibility = EyePosition ();
|
||||
|
||||
if (pev->flags & FL_DUCKING)
|
||||
potentialVisibility = potentialVisibility + (VEC_HULL_MIN - VEC_DUCK_HULL_MIN);
|
||||
|
||||
uint8 *pvs = ENGINE_SET_PVS (reinterpret_cast <float *> (&potentialVisibility));
|
||||
#endif
|
||||
|
||||
// search the world for players...
|
||||
for (int i = 0; i < engine.MaxClients (); i++)
|
||||
{
|
||||
|
|
@ -257,11 +247,7 @@ bool Bot::LookupEnemy (void)
|
|||
continue;
|
||||
|
||||
player = client.ent;
|
||||
#if 0
|
||||
// let the engine check if this player is potentially visible
|
||||
if (!ENGINE_CHECK_VISIBILITY (player, pvs))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
// do some blind by smoke grenade
|
||||
if (m_blindRecognizeTime < engine.Time () && IsBehindSmokeClouds (player))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue