ignore distance to last enemy

This commit is contained in:
jeefo 2015-07-01 01:06:37 +03:00
commit d1caf7cc48

View file

@ -2018,15 +2018,12 @@ void Bot::SetConditions (void)
m_states &= ~STATE_HEARING_ENEMY; m_states &= ~STATE_HEARING_ENEMY;
if (IsEntityNull (m_enemy) && !IsEntityNull (m_lastEnemy) && m_lastEnemyOrigin != nullvec) if (IsEntityNull (m_enemy) && !IsEntityNull (m_lastEnemy) && m_lastEnemyOrigin != nullvec)
{
if ((pev->origin - m_lastEnemyOrigin).GetLength () < 1600.0f)
{ {
m_aimFlags |= AIM_PREDICT_PATH; m_aimFlags |= AIM_PREDICT_PATH;
if (EntityIsVisible (m_lastEnemyOrigin)) if (EntityIsVisible (m_lastEnemyOrigin))
m_aimFlags |= AIM_LAST_ENEMY; m_aimFlags |= AIM_LAST_ENEMY;
} }
}
CheckGrenadeThrow (); CheckGrenadeThrow ();
// check if there are items needing to be used/collected // check if there are items needing to be used/collected