Skip to content

Commit 7be4c4b

Browse files
committed
Fix warnings.
1 parent 8906644 commit 7be4c4b

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

dlls/clcampaign/shrek.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ int CShrek::IgnoreConditions( void )
249249
iIgnore = bits_COND_SMELL | bits_COND_SMELL_FOOD;
250250
}
251251

252-
if( m_hEnemy != NULL )
252+
if( m_hEnemy != 0 )
253253
{
254254
if( FClassnameIs( m_hEnemy->pev, "monster_headcrab" ) )
255255
{
@@ -288,7 +288,7 @@ int CShrek::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float f
288288

289289
// 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,
290290
// it will swerve. (whew).
291-
if( m_hEnemy != NULL && IsMoving() && pevAttacker == m_hEnemy->pev && gpGlobals->time - m_flLastHurtTime > 3 )
291+
if( m_hEnemy != 0 && IsMoving() && pevAttacker == m_hEnemy->pev && gpGlobals->time - m_flLastHurtTime > 3 )
292292
{
293293
flDist = ( pev->origin - m_hEnemy->pev->origin ).Length2D();
294294

@@ -325,7 +325,7 @@ BOOL CShrek::CheckRangeAttack1( float flDot, float flDist )
325325

326326
if( flDist > 64 && flDist <= 784 && flDot >= 0.5 && gpGlobals->time >= m_flNextSpitTime )
327327
{
328-
if( m_hEnemy != NULL )
328+
if( m_hEnemy != 0 )
329329
{
330330
if( fabs( pev->origin.z - m_hEnemy->pev->origin.z ) > 256 )
331331
{
@@ -785,7 +785,7 @@ void CShrek::RunAI( void )
785785
pev->skin = 1;
786786
}
787787

788-
if( m_hEnemy != NULL && m_Activity == ACT_RUN )
788+
if( m_hEnemy != 0 && m_Activity == ACT_RUN )
789789
{
790790
// chasing enemy. Sprint for last bit
791791
if( ( pev->origin - m_hEnemy->pev->origin).Length2D() < SHREK_SPRINT_DIST )
@@ -1248,10 +1248,10 @@ MONSTERSTATE CShrek::GetIdealState( void )
12481248
COMBAT goes to ALERT upon death of enemy
12491249
*/
12501250
{
1251-
if( m_hEnemy != NULL && ( iConditions & bits_COND_LIGHT_DAMAGE || iConditions & bits_COND_HEAVY_DAMAGE ) && FClassnameIs( m_hEnemy->pev, "monster_headcrab" ) )
1251+
if( m_hEnemy != 0 && ( iConditions & bits_COND_LIGHT_DAMAGE || iConditions & bits_COND_HEAVY_DAMAGE ) && FClassnameIs( m_hEnemy->pev, "monster_headcrab" ) )
12521252
{
12531253
// if the squid has a headcrab enemy and something hurts it, it's going to forget about the crab for a while.
1254-
m_hEnemy = NULL;
1254+
m_hEnemy = 0;
12551255
m_IdealMonsterState = MONSTERSTATE_ALERT;
12561256
}
12571257
break;

dlls/clcampaign/skrillex.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void CSkrillex::HandleAnimEvent( MonsterEvent_t *pEvent )
227227
WRITE_BYTE( 0 ); // decay * 0.1
228228
MESSAGE_END();
229229
}
230-
if( m_hDead != NULL )
230+
if( m_hDead != 0 )
231231
{
232232
WackBeam( -1, m_hDead );
233233
WackBeam( 1, m_hDead );
@@ -247,7 +247,7 @@ void CSkrillex::HandleAnimEvent( MonsterEvent_t *pEvent )
247247
{
248248
ClearBeams();
249249

250-
if( m_hDead != NULL )
250+
if( m_hDead != 0 )
251251
{
252252
Vector vecDest = m_hDead->pev->origin + Vector( 0, 0, 38 );
253253
TraceResult trace;
@@ -318,11 +318,11 @@ BOOL CSkrillex::CheckRangeAttack2( float flDot, float flDist )
318318
return FALSE;
319319
}
320320

321-
m_hDead = NULL;
321+
m_hDead = 0;
322322
m_iBravery = 0;
323323

324-
CBaseEntity *pEntity = NULL;
325-
while( ( pEntity = UTIL_FindEntityByClassname( pEntity, "monster_skrillex" ) ) != NULL )
324+
CBaseEntity *pEntity = 0;
325+
while( ( pEntity = UTIL_FindEntityByClassname( pEntity, "monster_skrillex" ) ) != 0 )
326326
{
327327
TraceResult tr;
328328

@@ -345,7 +345,7 @@ BOOL CSkrillex::CheckRangeAttack2( float flDot, float flDist )
345345
}
346346
}
347347
}
348-
if( m_hDead != NULL )
348+
if( m_hDead != 0 )
349349
return TRUE;
350350
else
351351
return FALSE;
@@ -487,7 +487,7 @@ Schedule_t *CSkrillex::GetSchedule( void )
487487
CSound *pSound;
488488
pSound = PBestSound();
489489

490-
ASSERT( pSound != NULL );
490+
ASSERT( pSound != 0 );
491491

492492
if( pSound && ( pSound->m_iType & bits_SOUND_DANGER ) )
493493
return GetScheduleOfType( SCHED_TAKE_COVER_FROM_BEST_SOUND );
@@ -620,7 +620,7 @@ void CSkrillex::WackBeam( int side, CBaseEntity *pEntity )
620620
if( m_iBeams >= SKRILLEX_MAX_BEAMS )
621621
return;
622622

623-
if( pEntity == NULL )
623+
if( pEntity == 0 )
624624
return;
625625

626626
m_pBeam[m_iBeams] = CBeam::BeamCreate( "sprites/lgtning.spr", 30 );
@@ -665,7 +665,7 @@ void CSkrillex::ZapBeam( int side )
665665
m_iBeams++;
666666

667667
pEntity = CBaseEntity::Instance( tr.pHit );
668-
if( pEntity != NULL && pEntity->pev->takedamage )
668+
if( pEntity != 0 && pEntity->pev->takedamage )
669669
{
670670
pEntity->TraceAttack( pev, gSkillData.slaveDmgZap, vecAim, &tr, DMG_SHOCK );
671671
}
@@ -682,7 +682,7 @@ void CSkrillex::ClearBeams()
682682
if( m_pBeam[i] )
683683
{
684684
UTIL_Remove( m_pBeam[i] );
685-
m_pBeam[i] = NULL;
685+
m_pBeam[i] = 0;
686686
}
687687
}
688688
m_iBeams = 0;

0 commit comments

Comments
 (0)