disable by default ultra-mega-high-skill mode
pvs check done only for new enemy
This commit is contained in:
parent
e6a3f60448
commit
a04f47273e
4 changed files with 12 additions and 13 deletions
|
|
@ -3084,7 +3084,7 @@ void Bot::RunTask_Normal (void)
|
|||
m_prevGoalIndex = -1;
|
||||
|
||||
// spray logo sometimes if allowed to do so
|
||||
if (!g_bombPlanted && m_timeLogoSpray < GetWorldTime () && yb_spraypaints.GetBool () && Random.Long (1, 100) < 60 && m_moveSpeed > GetWalkSpeed () && IsEntityNull (m_pickupItem))
|
||||
if (m_timeLogoSpray < GetWorldTime () && yb_spraypaints.GetBool () && Random.Long (1, 100) < 60 && m_moveSpeed > GetWalkSpeed () && IsEntityNull (m_pickupItem))
|
||||
{
|
||||
if (!((g_mapType & MAP_DE) && g_bombPlanted && m_team == TEAM_CF))
|
||||
PushTask (TASK_SPRAY, TASKPRI_SPRAYLOGO, -1, GetWorldTime () + 1.0f, false);
|
||||
|
|
|
|||
|
|
@ -228,14 +228,6 @@ bool Bot::LookupEnemy (void)
|
|||
|
||||
float nearestDistance = m_viewDistance;
|
||||
|
||||
// setup potentially visible set for this bot
|
||||
Vector potentialVisibility = EyePosition ();
|
||||
|
||||
if (pev->flags & FL_DUCKING)
|
||||
potentialVisibility = potentialVisibility + (VEC_HULL_MIN - VEC_DUCK_HULL_MIN);
|
||||
|
||||
byte *pvs = ENGINE_SET_PVS (reinterpret_cast <float *> (&potentialVisibility));
|
||||
|
||||
// clear suspected flag
|
||||
if (m_seeEnemyTime + 3.0f < GetWorldTime ())
|
||||
m_states &= ~STATE_SUSPECT_ENEMY;
|
||||
|
|
@ -257,10 +249,18 @@ bool Bot::LookupEnemy (void)
|
|||
// ignore shielded enemies, while we have real one
|
||||
edict_t *shieldEnemy = NULL;
|
||||
|
||||
// setup potentially visible set for this bot
|
||||
Vector potentialVisibility = EyePosition ();
|
||||
|
||||
if (pev->flags & FL_DUCKING)
|
||||
potentialVisibility = potentialVisibility + (VEC_HULL_MIN - VEC_DUCK_HULL_MIN);
|
||||
|
||||
byte *pvs = ENGINE_SET_PVS (reinterpret_cast <float *> (&potentialVisibility));
|
||||
|
||||
// search the world for players...
|
||||
for (int i = 0; i < GetMaxClients (); i++)
|
||||
{
|
||||
if (!(g_clients[i].flags & CF_USED) || !(g_clients[i].flags & CF_ALIVE) || (g_clients[i].team == m_team) || (g_clients[i].ent == GetEntity ()))
|
||||
if (!(g_clients[i].flags & CF_USED) || !(g_clients[i].flags & CF_ALIVE) || g_clients[i].team == m_team || g_clients[i].ent == GetEntity ())
|
||||
continue;
|
||||
|
||||
player = g_clients[i].ent;
|
||||
|
|
|
|||
|
|
@ -2177,8 +2177,6 @@ void StartFrame (void)
|
|||
|
||||
if (g_timePerSecondUpdate < GetWorldTime ())
|
||||
{
|
||||
bots.CalculatePingOffsets ();
|
||||
|
||||
for (int i = 0; i < GetMaxClients (); i++)
|
||||
{
|
||||
edict_t *player = EntityOfIndex (i + 1);
|
||||
|
|
@ -2206,6 +2204,7 @@ void StartFrame (void)
|
|||
}
|
||||
}
|
||||
}
|
||||
bots.CalculatePingOffsets ();
|
||||
|
||||
if (g_bombPlanted)
|
||||
waypoints.SetBombPosition ();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <core.h>
|
||||
|
||||
ConVar yb_whose_your_daddy ("yb_whose_your_daddy", "1");
|
||||
ConVar yb_whose_your_daddy ("yb_whose_your_daddy", "0");
|
||||
|
||||
int Bot::FindGoal (void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue