Browse Source

Fix some warnings.

cthulhu
Night Owl 7 years ago
parent
commit
b31b4e86b2
  1. 4
      dlls/alias.cpp
  2. 1
      dlls/barney.cpp
  3. 2
      dlls/bigmomma.cpp
  4. 2
      dlls/bullsquid.cpp
  5. 2
      dlls/cbase.h
  6. 2
      dlls/combat.cpp
  7. 8
      dlls/controller.cpp
  8. 4
      dlls/effects.cpp
  9. 2
      dlls/func_tank.cpp
  10. 6
      dlls/hassassin.cpp
  11. 8
      dlls/hgrunt.cpp
  12. 12
      dlls/islave_deamon.cpp
  13. 2
      dlls/locus.cpp
  14. 2
      dlls/monsters.cpp
  15. 2
      dlls/player.cpp
  16. 20
      dlls/scripted.cpp
  17. 2
      dlls/squeakgrenade.cpp
  18. 8
      dlls/triggers.cpp
  19. 4
      dlls/util.cpp
  20. 4
      dlls/util.h

4
dlls/alias.cpp

@ -160,7 +160,7 @@ int CInfoGroup::GetMember( const char* szMemberName )
if (!szMemberName) if (!szMemberName)
{ {
ALERT(at_console,"info_group: GetMember called with null szMemberName!?\n"); ALERT(at_console,"info_group: GetMember called with null szMemberName!?\n");
return NULL; return 0;
} }
for (int i = 0; i < m_cMembers; i++) for (int i = 0; i < m_cMembers; i++)
{ {
@ -183,7 +183,7 @@ int CInfoGroup::GetMember( const char* szMemberName )
ALERT(at_console,"info_group \"%s\" has no member called \"%s\".\n",STRING(pev->targetname),szMemberName); ALERT(at_console,"info_group \"%s\" has no member called \"%s\".\n",STRING(pev->targetname),szMemberName);
// ALERT(at_console,"getMember: fail\n"); // ALERT(at_console,"getMember: fail\n");
return NULL; return 0;
} }
/********************* /*********************

1
dlls/barney.cpp

@ -713,7 +713,6 @@ Schedule_t *CBarney::GetScheduleOfType( int Type )
switch( Type ) switch( Type )
{ {
case SCHED_ARM_WEAPON: case SCHED_ARM_WEAPON:
if ( m_hEnemy != NULL )
if( m_hEnemy != 0 ) if( m_hEnemy != 0 )
{ {
// face enemy, then draw. // face enemy, then draw.

2
dlls/bigmomma.cpp

@ -626,7 +626,7 @@ void CBigMomma::LaunchMortar( void )
if (m_pCine) // is a scripted_action making me shoot? if (m_pCine) // is a scripted_action making me shoot?
{ {
if (m_hTargetEnt != NULL) // don't check m_fTurnType- bigmomma can fire in any direction. if (m_hTargetEnt != 0) // don't check m_fTurnType- bigmomma can fire in any direction.
{ {
vecLaunch = VecCheckSplatToss( pev, startPos, m_hTargetEnt->pev->origin, RANDOM_FLOAT( 150, 500 ) ); vecLaunch = VecCheckSplatToss( pev, startPos, m_hTargetEnt->pev->origin, RANDOM_FLOAT( 150, 500 ) );
} }

2
dlls/bullsquid.cpp

@ -550,7 +550,7 @@ void CBullsquid::HandleAnimEvent( MonsterEvent_t *pEvent )
vecSpitOffset = ( pev->origin + vecSpitOffset ); vecSpitOffset = ( pev->origin + vecSpitOffset );
if (m_pCine) // LRC- are we being told to do this by a scripted_action? if (m_pCine) // LRC- are we being told to do this by a scripted_action?
{ {
if (m_hTargetEnt != NULL && m_pCine->PreciseAttack()) if (m_hTargetEnt != 0 && m_pCine->PreciseAttack())
vecSpitDir = ( ( m_hTargetEnt->pev->origin ) - vecSpitOffset ).Normalize(); vecSpitDir = ( ( m_hTargetEnt->pev->origin ) - vecSpitOffset ).Normalize();
else else
vecSpitDir = gpGlobals->v_forward; vecSpitDir = gpGlobals->v_forward;

2
dlls/cbase.h

@ -100,7 +100,7 @@ typedef enum
USE_NOT = 6, USE_NOT = 6,
} USE_TYPE; } USE_TYPE;
extern char* GetStringForUseType( USE_TYPE useType ); extern const char *GetStringForUseType( USE_TYPE useType );
extern void FireTargets( const char *targetName, CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); extern void FireTargets( const char *targetName, CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );

2
dlls/combat.cpp

@ -977,7 +977,7 @@ int CBaseMonster::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, f
else if (m_iPlayerReact == 3) else if (m_iPlayerReact == 3)
{ {
// try to decide whether it was deliberate... if I have an enemy, assume it was just crossfire. // try to decide whether it was deliberate... if I have an enemy, assume it was just crossfire.
if ( m_hEnemy == NULL ) if ( m_hEnemy == 0 )
{ {
if ( (m_afMemory & bits_MEMORY_SUSPICIOUS) || UTIL_IsFacing( pevAttacker, pev->origin ) ) if ( (m_afMemory & bits_MEMORY_SUSPICIOUS) || UTIL_IsFacing( pevAttacker, pev->origin ) )
Remember( bits_MEMORY_PROVOKED ); Remember( bits_MEMORY_PROVOKED );

8
dlls/controller.cpp

@ -647,11 +647,11 @@ void CController::RunTask( Task_t *pTask )
Vector vecSrc = vecHand + pev->velocity * ( m_flShootTime - gpGlobals->time ); Vector vecSrc = vecHand + pev->velocity * ( m_flShootTime - gpGlobals->time );
Vector vecDir; Vector vecDir;
if (m_pCine != NULL || m_hEnemy != NULL) if (m_pCine != 0 || m_hEnemy != 0 )
{ {
if (m_pCine != NULL) // LRC- is this a script that's telling it to fire? if (m_pCine != 0) // LRC- is this a script that's telling it to fire?
{ {
if (m_hTargetEnt != NULL && m_pCine->PreciseAttack()) if (m_hTargetEnt != 0 && m_pCine->PreciseAttack())
{ {
vecDir = (m_hTargetEnt->pev->origin - pev->origin).Normalize() * gSkillData.controllerSpeedBall; vecDir = (m_hTargetEnt->pev->origin - pev->origin).Normalize() * gSkillData.controllerSpeedBall;
} }
@ -661,7 +661,7 @@ void CController::RunTask( Task_t *pTask )
vecDir = gpGlobals->v_forward * gSkillData.controllerSpeedBall; vecDir = gpGlobals->v_forward * gSkillData.controllerSpeedBall;
} }
} }
else if (m_hEnemy != NULL) else if (m_hEnemy != 0)
{ {
if( HasConditions( bits_COND_SEE_ENEMY ) ) if( HasConditions( bits_COND_SEE_ENEMY ) )
{ {

4
dlls/effects.cpp

@ -3966,7 +3966,7 @@ void CEnvELight::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE us
if (pev->target) if (pev->target)
{ {
m_hAttach = UTIL_FindEntityByTargetname( NULL, STRING(pev->target), pActivator); m_hAttach = UTIL_FindEntityByTargetname( NULL, STRING(pev->target), pActivator);
if (m_hAttach == NULL) if (m_hAttach == 0)
{ {
ALERT(at_console, "env_elight \"%s\" can't find target %s\n", STRING(pev->targetname), STRING(pev->target)); ALERT(at_console, "env_elight \"%s\" can't find target %s\n", STRING(pev->targetname), STRING(pev->target));
return; // error? return; // error?
@ -3982,7 +3982,7 @@ void CEnvELight::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE us
void CEnvELight::MakeLight(int iTime) void CEnvELight::MakeLight(int iTime)
{ {
if (m_hAttach == NULL) if (m_hAttach == 0)
{ {
DontThink(); DontThink();
pev->takedamage = 0; pev->takedamage = 0;

2
dlls/func_tank.cpp

@ -1577,7 +1577,7 @@ void CFuncTankControls::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_
return; return;
// if I've already got a controller, or the player's already using // if I've already got a controller, or the player's already using
// another controls, then forget it. // another controls, then forget it.
if (m_active != FALSE || ((CBasePlayer*)pActivator)->m_pTank != NULL) if (m_active != FALSE || ((CBasePlayer*)pActivator)->m_pTank != 0)
return; return;
//LRC- Now uses FindEntityByTargetname, so that aliases work. //LRC- Now uses FindEntityByTargetname, so that aliases work.

6
dlls/hassassin.cpp

@ -186,7 +186,7 @@ void CHAssassin::SetYawSpeed( void )
//========================================================= //=========================================================
void CHAssassin::Shoot( void ) void CHAssassin::Shoot( void )
{ {
if (m_hEnemy == NULL && !m_pCine) //LRC if (m_hEnemy == 0 && !m_pCine) //LRC
{ {
return; return;
} }
@ -251,7 +251,7 @@ void CHAssassin::HandleAnimEvent( MonsterEvent_t *pEvent )
if (m_pCine && m_pCine->IsAction()) if (m_pCine && m_pCine->IsAction())
{ {
Vector vecToss; Vector vecToss;
if (m_pCine->PreciseAttack() && m_hTargetEnt != NULL) if (m_pCine->PreciseAttack() && m_hTargetEnt != 0)
{ {
vecToss = VecCheckToss( pev, vecGunPosition, m_hTargetEnt->pev->origin, 0.5 ); vecToss = VecCheckToss( pev, vecGunPosition, m_hTargetEnt->pev->origin, 0.5 );
//if (vecToss != g_vecZero) //if (vecToss != g_vecZero)
@ -282,7 +282,7 @@ void CHAssassin::HandleAnimEvent( MonsterEvent_t *pEvent )
if (m_pCine) //LRC... if (m_pCine) //LRC...
{ {
pev->velocity = g_vecZero; pev->velocity = g_vecZero;
if (m_pCine->PreciseAttack() && m_hTargetEnt != NULL) if (m_pCine->PreciseAttack() && m_hTargetEnt != 0)
{ {
Vector vecTemp = m_hTargetEnt->pev->origin; Vector vecTemp = m_hTargetEnt->pev->origin;
vecTemp.y = vecTemp.y + 50; // put her feet on the target. vecTemp.y = vecTemp.y + 50; // put her feet on the target.

8
dlls/hgrunt.cpp

@ -789,7 +789,7 @@ Vector CHGrunt::GetGunPosition()
//========================================================= //=========================================================
void CHGrunt::Shoot( void ) void CHGrunt::Shoot( void )
{ {
if (m_hEnemy == NULL && m_pCine == NULL) //LRC - scripts may fire when you have no enemy if (m_hEnemy == 0 && m_pCine == 0) //LRC - scripts may fire when you have no enemy
{ {
return; return;
} }
@ -819,7 +819,7 @@ void CHGrunt::Shoot( void )
//========================================================= //=========================================================
void CHGrunt::Shotgun( void ) void CHGrunt::Shotgun( void )
{ {
if (m_hEnemy == NULL && m_pCine == NULL) if (m_hEnemy == 0 && m_pCine == 0)
{ {
return; return;
} }
@ -893,7 +893,7 @@ void CHGrunt::HandleAnimEvent( MonsterEvent_t *pEvent )
if (m_pCine) if (m_pCine)
{ {
Vector vecToss = g_vecZero; Vector vecToss = g_vecZero;
if (m_hTargetEnt != NULL && m_pCine->PreciseAttack()) if (m_hTargetEnt != 0 && m_pCine->PreciseAttack())
{ {
vecToss = VecCheckToss( pev, GetGunPosition(), m_hTargetEnt->pev->origin, 0.5 ); vecToss = VecCheckToss( pev, GetGunPosition(), m_hTargetEnt->pev->origin, 0.5 );
} }
@ -918,7 +918,7 @@ void CHGrunt::HandleAnimEvent( MonsterEvent_t *pEvent )
if (m_pCine) if (m_pCine)
{ {
Vector vecToss; Vector vecToss;
if (m_hTargetEnt != NULL && m_pCine->PreciseAttack()) if (m_hTargetEnt != 0 && m_pCine->PreciseAttack())
vecToss = VecCheckThrow( pev, GetGunPosition(), m_hTargetEnt->pev->origin, gSkillData.hgruntGrenadeSpeed, 0.5 ); vecToss = VecCheckThrow( pev, GetGunPosition(), m_hTargetEnt->pev->origin, gSkillData.hgruntGrenadeSpeed, 0.5 );
else else
{ {

12
dlls/islave_deamon.cpp

@ -51,7 +51,7 @@ public:
void HandleAnimEvent( MonsterEvent_t *pEvent ); void HandleAnimEvent( MonsterEvent_t *pEvent );
BOOL CheckRangeAttack1 ( float flDot, float flDist ); BOOL CheckRangeAttack1 ( float flDot, float flDist );
BOOL CheckRangeAttack2 ( float flDot, float flDist ); BOOL CheckRangeAttack2 ( float flDot, float flDist );
void CallForHelp( char *szClassname, float flDist, EHANDLE hEnemy, Vector &vecLocation ); void CallForHelp( const char *szClassname, float flDist, EHANDLE hEnemy, Vector &vecLocation );
void TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType); void TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
int TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType); int TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType);
@ -160,7 +160,7 @@ int CISlave::IRelationship( CBaseEntity *pTarget )
} }
void CISlave :: CallForHelp( char *szClassname, float flDist, EHANDLE hEnemy, Vector &vecLocation ) void CISlave :: CallForHelp( const char *szClassname, float flDist, EHANDLE hEnemy, Vector &vecLocation )
{ {
// ALERT( at_aiconsole, "help " ); // ALERT( at_aiconsole, "help " );
@ -191,7 +191,7 @@ void CISlave :: CallForHelp( char *szClassname, float flDist, EHANDLE hEnemy, Ve
//========================================================= //=========================================================
void CISlave :: AlertSound( void ) void CISlave :: AlertSound( void )
{ {
if ( m_hEnemy != NULL ) if ( m_hEnemy != 0 )
{ {
SENTENCEG_PlayRndSz(ENT(pev), "SLV_ALERT", 0.85, ATTN_NORM, 0, m_voicePitch); SENTENCEG_PlayRndSz(ENT(pev), "SLV_ALERT", 0.85, ATTN_NORM, 0, m_voicePitch);
@ -378,7 +378,7 @@ void CISlave :: HandleAnimEvent( MonsterEvent_t *pEvent )
MESSAGE_END( ); MESSAGE_END( );
} }
if (m_hDead != NULL) if (m_hDead != 0)
{ {
WackBeam( -1, m_hDead ); WackBeam( -1, m_hDead );
WackBeam( 1, m_hDead ); WackBeam( 1, m_hDead );
@ -399,7 +399,7 @@ void CISlave :: HandleAnimEvent( MonsterEvent_t *pEvent )
{ {
ClearBeams( ); ClearBeams( );
if (m_hDead != NULL) if (m_hDead != 0)
{ {
Vector vecDest = m_hDead->pev->origin + Vector( 0, 0, 38 ); Vector vecDest = m_hDead->pev->origin + Vector( 0, 0, 38 );
TraceResult trace; TraceResult trace;
@ -501,7 +501,7 @@ BOOL CISlave :: CheckRangeAttack2 ( float flDot, float flDist )
} }
} }
} }
if (m_hDead != NULL) if (m_hDead != 0)
return TRUE; return TRUE;
else else
return FALSE; return FALSE;

2
dlls/locus.cpp

@ -117,7 +117,7 @@ void CLocusAlias::FlushChanges( void )
CBaseEntity *CLocusAlias::FollowAlias( CBaseEntity *pFrom ) CBaseEntity *CLocusAlias::FollowAlias( CBaseEntity *pFrom )
{ {
if (m_hValue == NULL) if (m_hValue == 0)
return NULL; return NULL;
else if ( pFrom == NULL || (OFFSET(m_hValue->pev) > OFFSET(pFrom->pev)) ) else if ( pFrom == NULL || (OFFSET(m_hValue->pev) > OFFSET(pFrom->pev)) )
{ {

2
dlls/monsters.cpp

@ -3180,7 +3180,7 @@ BOOL CBaseMonster::FindLateralCover( const Vector &vecThreat, const Vector &vecV
Vector CBaseMonster::ShootAtEnemy( const Vector &shootOrigin ) Vector CBaseMonster::ShootAtEnemy( const Vector &shootOrigin )
{ {
if (m_pCine != NULL && m_hTargetEnt != NULL && (m_pCine->m_fTurnType == 1)) if (m_pCine != 0 && m_hTargetEnt != 0 && (m_pCine->m_fTurnType == 1))
{ {
Vector vecDest = ( m_hTargetEnt->pev->absmin + m_hTargetEnt->pev->absmax ) / 2; Vector vecDest = ( m_hTargetEnt->pev->absmin + m_hTargetEnt->pev->absmax ) / 2;
return ( vecDest - shootOrigin ).Normalize(); return ( vecDest - shootOrigin ).Normalize();

2
dlls/player.cpp

@ -5133,7 +5133,7 @@ class CPlayerFreeze:public CBaseDelay
{ {
void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
void Think( void ); void Think( void );
STATE GetState( void ) { return m_hActivator == NULL? STATE_OFF: STATE_ON; } STATE GetState( void ) { return m_hActivator == 0 ? STATE_OFF : STATE_ON; }
}; };
void CPlayerFreeze::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) void CPlayerFreeze::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )

20
dlls/scripted.cpp

@ -369,29 +369,29 @@ void CCineMonster::PossessEntity( void )
{ {
// anything with that name? // anything with that name?
pTarget->m_hTargetEnt = UTIL_FindEntityByTargetname(NULL, STRING(m_iszAttack), m_hActivator); pTarget->m_hTargetEnt = UTIL_FindEntityByTargetname(NULL, STRING(m_iszAttack), m_hActivator);
if ( pTarget->m_hTargetEnt == NULL ) if( pTarget->m_hTargetEnt == 0 )
{ // nothing. Anything with that classname? { // nothing. Anything with that classname?
while ((pTarget->m_hTargetEnt = UTIL_FindEntityInSphere( pTarget->m_hTargetEnt, pev->origin, m_flRadius )) != NULL) while ((pTarget->m_hTargetEnt = UTIL_FindEntityInSphere( pTarget->m_hTargetEnt, pev->origin, m_flRadius )) != NULL)
{ {
if (FClassnameIs( pTarget->m_hTargetEnt->pev, STRING(m_iszAttack))) break; if (FClassnameIs( pTarget->m_hTargetEnt->pev, STRING(m_iszAttack))) break;
}
} }
} if (pTarget->m_hTargetEnt == 0)
if (pTarget->m_hTargetEnt == NULL)
{ // nothing. Oh well. { // nothing. Oh well.
ALERT(at_console,"%s %s has a missing \"turn target\": %s\n",STRING(pev->classname),STRING(pev->targetname),STRING(m_iszAttack)); ALERT(at_console,"%s %s has a missing \"turn target\": %s\n",STRING(pev->classname),STRING(pev->targetname),STRING(m_iszAttack));
pTarget->m_hTargetEnt = this; pTarget->m_hTargetEnt = this;
} }
} }
else else
{ {
pTarget->m_hTargetEnt = this; pTarget->m_hTargetEnt = this;
} }
if (m_iszMoveTarget) if (m_iszMoveTarget)
{ {
// anything with that name? // anything with that name?
pTarget->m_pGoalEnt = UTIL_FindEntityByTargetname(NULL, STRING(m_iszMoveTarget), m_hActivator); pTarget->m_pGoalEnt = UTIL_FindEntityByTargetname(NULL, STRING(m_iszMoveTarget), m_hActivator);
if (pTarget->m_pGoalEnt == NULL) if( pTarget->m_pGoalEnt == 0 )
{ // nothing. Oh well. { // nothing. Oh well.
ALERT(at_console,"%s %s has a missing \"move target\": %s\n",STRING(pev->classname),STRING(pev->targetname),STRING(m_iszMoveTarget)); ALERT(at_console,"%s %s has a missing \"move target\": %s\n",STRING(pev->classname),STRING(pev->targetname),STRING(m_iszMoveTarget));
pTarget->m_pGoalEnt = this; pTarget->m_pGoalEnt = this;
@ -445,7 +445,7 @@ void CCineMonster::PossessEntity( void )
// at the beginning of the level, set up the idle animation. --LRC // at the beginning of the level, set up the idle animation. --LRC
void CCineMonster :: InitIdleThink( void ) void CCineMonster :: InitIdleThink( void )
{ {
if ((m_hTargetEnt = FindEntity(STRING(m_iszEntity), NULL)) != NULL) if ((m_hTargetEnt = FindEntity(STRING(m_iszEntity), NULL)) != NULL)
{ {
PossessEntity( ); PossessEntity( );

2
dlls/squeakgrenade.cpp

@ -189,7 +189,7 @@ void CSqueakGrenade::Killed( entvars_t *pevAttacker, int iGib )
RadiusDamage( pev, pev, pev->dmg, CLASS_NONE, DMG_BLAST ); RadiusDamage( pev, pev, pev->dmg, CLASS_NONE, DMG_BLAST );
// reset owner so death message happens // reset owner so death message happens
if (m_hOwner != NULL) if (m_hOwner != 0)
pev->owner = m_hOwner->edict(); pev->owner = m_hOwner->edict();
CBaseMonster::Killed( pevAttacker, GIB_ALWAYS ); CBaseMonster::Killed( pevAttacker, GIB_ALWAYS );

8
dlls/triggers.cpp

@ -1580,7 +1580,7 @@ public:
void Use ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); void Use ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
void Affect (CBaseEntity *pTarget, USE_TYPE useType); void Affect (CBaseEntity *pTarget, USE_TYPE useType);
int GetActionFor( int iField, int iActive, USE_TYPE useType, char *szDebug ); int GetActionFor( int iField, int iActive, USE_TYPE useType, const char *szDebug );
void SetBoneController (float fController, int cnum, CBaseEntity *pTarget); void SetBoneController (float fController, int cnum, CBaseEntity *pTarget);
virtual int ObjectCaps( void ) { return CBaseEntity :: ObjectCaps() & ~FCAP_ACROSS_TRANSITION; } virtual int ObjectCaps( void ) { return CBaseEntity :: ObjectCaps() & ~FCAP_ACROSS_TRANSITION; }
@ -2054,7 +2054,7 @@ void CEnvCustomize :: Affect (CBaseEntity *pTarget, USE_TYPE useType)
ALERT(at_console, " ]\n"); ALERT(at_console, " ]\n");
} }
int CEnvCustomize::GetActionFor( int iField, int iActive, USE_TYPE useType, char* szDebug) int CEnvCustomize::GetActionFor( int iField, int iActive, USE_TYPE useType, const char* szDebug)
{ {
int iAction = iField; int iAction = iField;
@ -3529,7 +3529,7 @@ int CChangeLevel::ChangeList( LEVELLIST *pLevelList, int maxList )
CBaseEntity *pChangelevel = UTIL_FindEntityByClassname( NULL, "trigger_changelevel" ); CBaseEntity *pChangelevel = UTIL_FindEntityByClassname( NULL, "trigger_changelevel" );
if ( !pChangelevel ) if ( !pChangelevel )
return NULL; return 0;
while ( pChangelevel ) while ( pChangelevel )
{ {
@ -4595,7 +4595,7 @@ IMPLEMENT_SAVERESTORE(CMotionThread,CPointEntity);
void CMotionThread::Think( void ) void CMotionThread::Think( void )
{ {
if (m_hLocus == NULL || m_hTarget == NULL) if( m_hLocus == 0 || m_hTarget == 0 )
{ {
if (pev->spawnflags & SF_MOTION_DEBUG) if (pev->spawnflags & SF_MOTION_DEBUG)
ALERT(at_console, "motion_thread expires\n"); ALERT(at_console, "motion_thread expires\n");

4
dlls/util.cpp

@ -1984,7 +1984,7 @@ void UTIL_StripToken( const char *pKey, char *pDest )
} }
char* GetStringForUseType( USE_TYPE useType ) const char* GetStringForUseType( USE_TYPE useType )
{ {
switch(useType) switch(useType)
{ {
@ -1998,7 +1998,7 @@ char* GetStringForUseType( USE_TYPE useType )
} }
} }
char* GetStringForState( STATE state ) const char *GetStringForState( STATE state )
{ {
switch(state) switch(state)
{ {

4
dlls/util.h

@ -209,7 +209,7 @@ typedef enum
// In_Use isn't very useful, I'll probably remove it. // In_Use isn't very useful, I'll probably remove it.
} STATE; } STATE;
extern char* GetStringForState( STATE state ); extern const char *GetStringForState( STATE state );
// Things that toggle (buttons/triggers/doors) need this // Things that toggle (buttons/triggers/doors) need this
typedef enum typedef enum
@ -614,4 +614,4 @@ int GetStdLightStyle (int iStyle); //LRC- declared here so it can be used by eve
// needs to deal with the standard lightstyles. // needs to deal with the standard lightstyles.
// LRC- for aliases and groups // LRC- for aliases and groups
CBaseEntity* UTIL_FollowReference( CBaseEntity* pStartEntity, const char* szName ); CBaseEntity* UTIL_FollowReference( CBaseEntity* pStartEntity, const char* szName );
#endif // UTIL_H #endif // UTIL_H

Loading…
Cancel
Save