mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-26 06:34:23 +00:00
Fix some warnings.
This commit is contained in:
parent
52ac446b1f
commit
1368c0fae5
@ -139,9 +139,9 @@ CBaseMonster *CBlkopOsprey::MakeGrunt(Vector vecSrc)
|
||||
|
||||
for (int i = 0; i < m_iUnits; i++)
|
||||
{
|
||||
if (m_hGrunt[i] == NULL || !m_hGrunt[i]->IsAlive())
|
||||
if (m_hGrunt[i] == 0 || !m_hGrunt[i]->IsAlive())
|
||||
{
|
||||
if (m_hGrunt[i] != NULL && m_hGrunt[i]->pev->rendermode == kRenderNormal)
|
||||
if (m_hGrunt[i] != 0 && m_hGrunt[i]->pev->rendermode == kRenderNormal)
|
||||
{
|
||||
m_hGrunt[i]->SUB_StartFadeOut();
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ int CMassn::IRelationship( CBaseEntity *pTarget )
|
||||
//=========================================================
|
||||
void CMassn::Sniperrifle(void)
|
||||
{
|
||||
if (m_hEnemy == NULL)
|
||||
if (m_hEnemy == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -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())
|
||||
{
|
||||
@ -302,7 +302,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))
|
||||
@ -477,10 +477,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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
||||
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
|
||||
|
||||
// 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)
|
||||
// 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)
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return CBaseMonster::GetSchedule();
|
||||
|
@ -335,10 +335,10 @@ public:
|
||||
void KeyValue( KeyValueData *pkvd );
|
||||
|
||||
int m_iPose;// which sequence to display -- temporary, don't need to save
|
||||
static char *m_szPoses[2];
|
||||
static const char *m_szPoses[2];
|
||||
};
|
||||
|
||||
char *CDeadZSoldier::m_szPoses[] =
|
||||
const char *CDeadZSoldier::m_szPoses[] =
|
||||
{
|
||||
"dead_on_back",
|
||||
"dead_on_stomach"
|
||||
|
Loading…
x
Reference in New Issue
Block a user