mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-04 11:04:28 +00:00
Fix warnings.
This commit is contained in:
parent
183aa9f6f2
commit
9471f12795
@ -83,7 +83,7 @@ int CPoolstick::GetItemInfo(ItemInfo *p)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int CBeretta::AddToPlayer( CBasePlayer *pPlayer )
|
||||
int CPoolstick::AddToPlayer( CBasePlayer *pPlayer )
|
||||
{
|
||||
if( CBasePlayerWeapon::AddToPlayer( pPlayer ) )
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ int CSPForce :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, flo
|
||||
//=========================================================
|
||||
void CSPForce :: Shoot ( void )
|
||||
{
|
||||
if (m_hEnemy == NULL)
|
||||
if (m_hEnemy == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -243,7 +243,7 @@ void CSPForce :: Shoot ( void )
|
||||
//=========================================================
|
||||
void CSPForce :: Beretta ( void )
|
||||
{
|
||||
if (m_hEnemy == NULL)
|
||||
if (m_hEnemy == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ const char *CTerror::pTerrorSentences[] =
|
||||
"TR_TAUNT", // say rude things
|
||||
};
|
||||
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
TERROR_SENT_NONE = -1,
|
||||
TERROR_SENT_GREN = 0,
|
||||
@ -631,10 +631,10 @@ Schedule_t *CTerror :: GetSchedule( void )
|
||||
// before he starts pluggin away.
|
||||
if (FOkToSpeak())// && RANDOM_LONG(0,1))
|
||||
{
|
||||
if ((m_hEnemy != NULL) && m_hEnemy->IsPlayer())
|
||||
if ((m_hEnemy != 0) && m_hEnemy->IsPlayer())
|
||||
// player
|
||||
SENTENCEG_PlayRndSz( ENT(pev), "TR_ALERT", TERROR_SENTENCE_VOLUME, TERROR_ATTN, 0, m_voicePitch);
|
||||
else if ((m_hEnemy != NULL) &&
|
||||
else if ((m_hEnemy != 0) &&
|
||||
(m_hEnemy->Classify() != CLASS_PLAYER_ALLY) &&
|
||||
(m_hEnemy->Classify() != CLASS_HUMAN_PASSIVE) &&
|
||||
(m_hEnemy->Classify() != CLASS_MACHINE))
|
||||
@ -672,7 +672,7 @@ Schedule_t *CTerror :: GetSchedule( void )
|
||||
// 10% chance of flinch.
|
||||
int iPercent = RANDOM_LONG(0,99);
|
||||
|
||||
if ( iPercent <= 90 && m_hEnemy != NULL )
|
||||
if ( iPercent <= 90 && m_hEnemy != 0 )
|
||||
{
|
||||
// only try to take cover if we actually have an enemy!
|
||||
|
||||
@ -908,7 +908,7 @@ Schedule_t* CTerror :: GetScheduleOfType ( int Type )
|
||||
}
|
||||
case SCHED_FAIL:
|
||||
{
|
||||
if ( m_hEnemy != NULL )
|
||||
if ( m_hEnemy != 0 )
|
||||
{
|
||||
// grunt has an enemy, so pick a different default fail schedule most likely to help recover.
|
||||
return &slGruntCombatFail[ 0 ];
|
||||
|
@ -93,7 +93,7 @@ int CToadGrenade :: Classify ( void )
|
||||
if (m_iMyClass != 0)
|
||||
return m_iMyClass; // protect against recursion
|
||||
|
||||
if (m_hEnemy != NULL)
|
||||
if (m_hEnemy != 0)
|
||||
{
|
||||
m_iMyClass = CLASS_INSECT; // no one cares about it
|
||||
switch( m_hEnemy->Classify( ) )
|
||||
@ -180,13 +180,13 @@ void CToadGrenade :: Killed( entvars_t *pevAttacker, int iGib )
|
||||
|
||||
UTIL_BloodDrips( pev->origin, g_vecZero, BloodColor(), 80 );
|
||||
|
||||
if (m_hOwner != NULL)
|
||||
if (m_hOwner != 0)
|
||||
RadiusDamage ( pev, m_hOwner->pev, pev->dmg, CLASS_NONE, DMG_BLAST );
|
||||
else
|
||||
RadiusDamage ( pev, pev, pev->dmg, CLASS_NONE, DMG_BLAST );
|
||||
|
||||
// reset owner so death message happens
|
||||
if (m_hOwner != NULL)
|
||||
if (m_hOwner != 0)
|
||||
pev->owner = m_hOwner->edict();
|
||||
|
||||
CBaseMonster :: Killed( pevAttacker, GIB_ALWAYS );
|
||||
@ -244,7 +244,7 @@ void CToadGrenade::HuntThink( void )
|
||||
|
||||
m_flNextHunt = gpGlobals->time + 2.0;
|
||||
|
||||
CBaseEntity *pOther = NULL;
|
||||
CBaseEntity *pOther = 0;
|
||||
Vector vecDir;
|
||||
TraceResult tr;
|
||||
|
||||
@ -254,7 +254,7 @@ void CToadGrenade::HuntThink( void )
|
||||
|
||||
UTIL_MakeVectors( pev->angles );
|
||||
|
||||
if (m_hEnemy == NULL || !m_hEnemy->IsAlive())
|
||||
if (m_hEnemy == 0 || !m_hEnemy->IsAlive())
|
||||
{
|
||||
// find target, bounce a bit towards it.
|
||||
Look( 512 );
|
||||
@ -273,7 +273,7 @@ void CToadGrenade::HuntThink( void )
|
||||
if (flpitch < 80)
|
||||
flpitch = 80;
|
||||
|
||||
if (m_hEnemy != NULL)
|
||||
if (m_hEnemy != 0)
|
||||
{
|
||||
if (FVisible( m_hEnemy ))
|
||||
{
|
||||
@ -331,7 +331,7 @@ void CToadGrenade::SuperBounceTouch( CBaseEntity *pOther )
|
||||
return;
|
||||
|
||||
// at least until we've bounced once
|
||||
pev->owner = NULL;
|
||||
pev->owner = 0;
|
||||
|
||||
pev->angles.x = 0;
|
||||
pev->angles.z = 0;
|
||||
@ -356,7 +356,7 @@ void CToadGrenade::SuperBounceTouch( CBaseEntity *pOther )
|
||||
// ALERT( at_console, "hit enemy\n");
|
||||
ClearMultiDamage( );
|
||||
pOther->TraceAttack(pev, gSkillData.toadDmgBite, gpGlobals->v_forward, &tr, DMG_SLASH );
|
||||
if (m_hOwner != NULL)
|
||||
if (m_hOwner != 0)
|
||||
ApplyMultiDamage( pev, m_hOwner->pev );
|
||||
else
|
||||
ApplyMultiDamage( pev, pev );
|
||||
|
@ -291,7 +291,7 @@ class CItemBattery : public CItem
|
||||
{
|
||||
EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "barney/nope.wav", 1, ATTN_NORM );
|
||||
UTIL_ShowMessageAll( "NOHEVBATTERY" );
|
||||
NextMessageTime < gpGlobals->time + 4.0;
|
||||
NextMessageTime = gpGlobals->time + 4.0;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user