Fixed compiler warning in npc_hunter: initialization of pointer of type 'CBaseEntity *' to null from a constant boolean expression [-Wbool-conversion]

Building on Mac OS X 10.8.4, Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

REDACTED/sp/src/game/server/episodic/npc_hunter.cpp:6356:9: warning: initialization of pointer of type 'CBaseEntity *' to null from a constant boolean expression [-Wbool-conversion]
 return false;
        ^~~~~
This commit is contained in:
Yaakov 2013-07-06 21:28:24 +10:00
parent 4e4d07d7ef
commit e1affd530e

View file

@ -6347,13 +6347,13 @@ void CNPC_Hunter::FootFX( const Vector &origin )
CBaseEntity *CNPC_Hunter::GetEnemyVehicle()
{
if ( GetEnemy() == NULL )
return false;
return NULL;
CBaseCombatCharacter *pCCEnemy = GetEnemy()->MyCombatCharacterPointer();
if ( pCCEnemy != NULL )
return pCCEnemy->GetVehicleEntity();
return false;
return NULL;
}