mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-11 15:38:12 +00:00
Fix some warnings.
This commit is contained in:
parent
9df40b8eb2
commit
a24112b419
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user