|
|
|
@ -149,7 +149,7 @@ int CPitdrone::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float
@@ -149,7 +149,7 @@ int CPitdrone::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float
|
|
|
|
|
|
|
|
|
|
// if the squid is running, has an enemy, was hurt by the enemy, hasn't been hurt in the last 3 seconds, and isn't too close to the enemy,
|
|
|
|
|
// it will swerve. (whew).
|
|
|
|
|
if (m_hEnemy != NULL && IsMoving() && pevAttacker == m_hEnemy->pev) |
|
|
|
|
if (m_hEnemy != 0 && IsMoving() && pevAttacker == m_hEnemy->pev) |
|
|
|
|
{ |
|
|
|
|
flDist = (pev->origin - m_hEnemy->pev->origin).Length2D(); |
|
|
|
|
|
|
|
|
@ -181,7 +181,7 @@ BOOL CPitdrone::CheckRangeAttack1(float flDot, float flDist)
@@ -181,7 +181,7 @@ BOOL CPitdrone::CheckRangeAttack1(float flDot, float flDist)
|
|
|
|
|
|
|
|
|
|
if (flDist > 64 && flDist <= 784 && flDot >= 0.5 && gpGlobals->time >= m_flNextSpitTime) |
|
|
|
|
{ |
|
|
|
|
if (m_hEnemy != NULL) |
|
|
|
|
if (m_hEnemy != 0) |
|
|
|
|
{ |
|
|
|
|
if (fabs(pev->origin.z - m_hEnemy->pev->origin.z) > 256) |
|
|
|
|
{ |
|
|
|
@ -893,7 +893,7 @@ int CPitDrone::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float
@@ -893,7 +893,7 @@ int CPitDrone::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float
|
|
|
|
|
|
|
|
|
|
// if the pitdrone is running, has an enemy, was hurt by the enemy, and isn't too close to the enemy,
|
|
|
|
|
// it will swerve. (whew).
|
|
|
|
|
if (m_hEnemy != NULL && IsMoving() && pevAttacker == m_hEnemy->pev ) |
|
|
|
|
if (m_hEnemy != 0 && IsMoving() && pevAttacker == m_hEnemy->pev ) |
|
|
|
|
{ |
|
|
|
|
flDist = (pev->origin - m_hEnemy->pev->origin).Length2D(); |
|
|
|
|
|
|
|
|
@ -1297,7 +1297,7 @@ void CPitDrone::RunAI(void)
@@ -1297,7 +1297,7 @@ void CPitDrone::RunAI(void)
|
|
|
|
|
// first, do base class stuff
|
|
|
|
|
CBaseMonster::RunAI(); |
|
|
|
|
|
|
|
|
|
if (m_hEnemy != NULL && m_Activity == ACT_RUN) |
|
|
|
|
if (m_hEnemy != 0 && m_Activity == ACT_RUN) |
|
|
|
|
{ |
|
|
|
|
// chasing enemy. Sprint for last bit
|
|
|
|
|
if ((pev->origin - m_hEnemy->pev->origin).Length2D() < PITDRONE_SPRINT_DIST) |
|
|
|
@ -1601,6 +1601,8 @@ Schedule_t *CPitDrone::GetSchedule(void)
@@ -1601,6 +1601,8 @@ Schedule_t *CPitDrone::GetSchedule(void)
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return CBaseMonster::GetSchedule(); |
|
|
|
|