mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-12 05:22:55 +00:00
Fix some warnings.
This commit is contained in:
parent
0ea3cc77bf
commit
664eea792c
@ -320,7 +320,7 @@ void CBarney::BarneyFirePistol( void )
|
||||
|
||||
Vector vecSpread;
|
||||
|
||||
if( m_hEnemy == NULL || !m_hEnemy->IsPlayer() )
|
||||
if( m_hEnemy == 0 || !m_hEnemy->IsPlayer() )
|
||||
{
|
||||
// Higher chance to hit target.
|
||||
vecSpread = VECTOR_CONE_2DEGREES;
|
||||
@ -384,12 +384,11 @@ void CBarney::Spawn()
|
||||
{
|
||||
Precache();
|
||||
|
||||
char* szModel = (char*)STRING( pev->model );
|
||||
if( !szModel || !*szModel )
|
||||
if( !pev->model )
|
||||
{
|
||||
szModel = "models/barney.mdl";
|
||||
pev->model = MAKE_STRING( "models/barney.mdl" );
|
||||
}
|
||||
SET_MODEL( ENT( pev ), szModel );
|
||||
SET_MODEL( ENT( pev ), STRING( pev->model ) );
|
||||
UTIL_SetSize( pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX );
|
||||
|
||||
pev->solid = SOLID_SLIDEBOX;
|
||||
|
@ -50,7 +50,7 @@ void CGlock::Spawn()
|
||||
pev->classname = MAKE_STRING( "weapon_9mmhandgun" ); // hack to allow for old names
|
||||
Precache();
|
||||
m_iId = WEAPON_GLOCK;
|
||||
char* szModel = NULL;
|
||||
const char* szModel = NULL;
|
||||
|
||||
if( pev->body == SILENCER_ON )
|
||||
szModel = GLOCK_MODEL_SILENCER;
|
||||
|
@ -76,7 +76,7 @@ const char *CBabyKelly::pDeathSounds[] =
|
||||
//=========================================================
|
||||
void CBabyKelly::AlertSound(void)
|
||||
{
|
||||
if (m_hEnemy != NULL)
|
||||
if (m_hEnemy != 0)
|
||||
{
|
||||
SENTENCEG_PlayRndSz(ENT(pev), "BKL_ALERT", 0.85, ATTN_NORM, 0, m_voicePitch);
|
||||
|
||||
@ -170,4 +170,4 @@ void CBabyKelly::Precache()
|
||||
PRECACHE_SOUND((char *)pDeathSounds[i]);
|
||||
|
||||
UTIL_PrecacheOther("test_effect");
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ BOOL CCyberFranklin::CheckMeleeAttack1(float flDot, float flDist)
|
||||
{
|
||||
CBaseMonster *pEnemy;
|
||||
|
||||
if (m_hEnemy != NULL)
|
||||
if (m_hEnemy != 0)
|
||||
{
|
||||
pEnemy = m_hEnemy->MyMonsterPointer();
|
||||
|
||||
|
@ -362,6 +362,8 @@ Schedule_t *CZombieBull::GetSchedule(void)
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return CBaseMonster::GetSchedule();
|
||||
|
@ -1063,7 +1063,7 @@ void CFuncTrackTrain::StopSound( void )
|
||||
/*
|
||||
STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noise ) );
|
||||
*/
|
||||
char *brake = "plats/ttrain_brake1.wav";
|
||||
const char *brake = "plats/ttrain_brake1.wav";
|
||||
|
||||
if( UseCustomSounds() )
|
||||
{
|
||||
|
@ -1500,7 +1500,7 @@ void CBasePlayer::PlayerUse( void )
|
||||
m_afPhysicsFlags |= PFLAG_ONTRAIN;
|
||||
m_iTrain = TrainSpeed( (int)pTrain->pev->speed, pTrain->pev->impulse );
|
||||
m_iTrain |= TRAIN_NEW;
|
||||
char* usesound = "plats/train_use1.wav";
|
||||
const char* usesound = "plats/train_use1.wav";
|
||||
|
||||
CFuncTrackTrain* pTrackTrain = (CFuncTrackTrain*)pTrain;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user