diff --git a/dlls/CAd/gonome.cpp b/dlls/CAd/gonome.cpp index 2fc3a4ea..79d27e9f 100644 --- a/dlls/CAd/gonome.cpp +++ b/dlls/CAd/gonome.cpp @@ -336,7 +336,7 @@ BOOL CGonome::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) { @@ -551,7 +551,7 @@ void CGonome::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() < GONOME_SPRINT_DIST) diff --git a/dlls/CAd/otis.cpp b/dlls/CAd/otis.cpp index 72fc9c94..8334fc46 100644 --- a/dlls/CAd/otis.cpp +++ b/dlls/CAd/otis.cpp @@ -91,7 +91,7 @@ LINK_ENTITY_TO_CLASS(monster_otis, COtis); //========================================================= void COtis::AlertSound(void) { - if (m_hEnemy != NULL) + if (m_hEnemy != 0) { if (FOkToSpeak()) { @@ -303,7 +303,7 @@ int COtis::TakeDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, float flD // This is a heurstic to determine if the player intended to harm me // If I have an enemy, we can't establish intent (may just be crossfire) - if (m_hEnemy == NULL) + if (m_hEnemy == 0) { // If the player was facing directly at me, or I'm already suspicious, get mad if ((m_afMemory & bits_MEMORY_SUSPICIOUS) || IsFacing(pevAttacker, pev->origin)) @@ -481,10 +481,10 @@ public: void KeyValue(KeyValueData *pkvd); int m_iPose;// which sequence to display -- temporary, don't need to save - static char *m_szPoses[5]; + static const char *m_szPoses[5]; }; -char *CDeadOtis::m_szPoses[] = { "lying_on_back", "lying_on_side", "lying_on_stomach", "stuffed_in_vent", "dead_sitting" }; +const char *CDeadOtis::m_szPoses[] = { "lying_on_back", "lying_on_side", "lying_on_stomach", "stuffed_in_vent", "dead_sitting" }; void CDeadOtis::KeyValue(KeyValueData *pkvd) {