Browse Source

Fix -Wshadow.

wantedhl
Night Owl 8 years ago
parent
commit
a8b188e1d5
  1. 7
      cl_dll/ev_hldm.cpp
  2. 2
      dlls/buttons.cpp
  3. 2
      dlls/gauss.cpp
  4. 2
      dlls/monsters.cpp
  5. 6
      dlls/talkmonster.cpp
  6. 4
      dlls/util.cpp

7
cl_dll/ev_hldm.cpp

@ -1048,7 +1048,6 @@ void EV_FireGauss( event_args_t *args )
if( !beam_tr.allsolid ) if( !beam_tr.allsolid )
{ {
vec3_t delta; vec3_t delta;
float n;
// trace backwards to find exit point // trace backwards to find exit point
gEngfuncs.pEventAPI->EV_PlayerTrace( beam_tr.endpos, tr.endpos, PM_STUDIO_BOX, -1, &beam_tr ); gEngfuncs.pEventAPI->EV_PlayerTrace( beam_tr.endpos, tr.endpos, PM_STUDIO_BOX, -1, &beam_tr );
@ -1057,9 +1056,9 @@ void EV_FireGauss( event_args_t *args )
n = Length( delta ); n = Length( delta );
if(n < flDamage) if( n < flDamage )
{ {
if(n == 0) if( n == 0 )
n = 1; n = 1;
flDamage -= n; flDamage -= n;
@ -1443,7 +1442,7 @@ void EV_EgonFire( event_args_t *args )
if( iStartup == 1 && EV_IsLocal( idx ) && !pBeam && !pBeam2 && cl_lw->value ) //Adrian: Added the cl_lw check for those lital people that hate weapon prediction. if( iStartup == 1 && EV_IsLocal( idx ) && !pBeam && !pBeam2 && cl_lw->value ) //Adrian: Added the cl_lw check for those lital people that hate weapon prediction.
{ {
vec3_t vecSrc, vecEnd, origin, angles, forward, right, up; vec3_t vecSrc, vecEnd, angles, forward, right, up;
pmtrace_t tr; pmtrace_t tr;
cl_entity_t *pl = gEngfuncs.GetEntityByIndex( idx ); cl_entity_t *pl = gEngfuncs.GetEntityByIndex( idx );

2
dlls/buttons.cpp

@ -191,7 +191,7 @@ void CMultiSource::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE
if( IsTriggered( pActivator ) ) if( IsTriggered( pActivator ) )
{ {
ALERT( at_aiconsole, "Multisource %s enabled (%d inputs)\n", STRING( pev->targetname ), m_iTotal ); ALERT( at_aiconsole, "Multisource %s enabled (%d inputs)\n", STRING( pev->targetname ), m_iTotal );
USE_TYPE useType = USE_TOGGLE; useType = USE_TOGGLE;
if( m_globalstate ) if( m_globalstate )
useType = USE_ON; useType = USE_ON;
SUB_UseTargets( NULL, useType, 0 ); SUB_UseTargets( NULL, useType, 0 );

2
dlls/gauss.cpp

@ -469,7 +469,7 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage )
// trace backwards to find exit point // trace backwards to find exit point
UTIL_TraceLine( beam_tr.vecEndPos, tr.vecEndPos, dont_ignore_monsters, pentIgnore, &beam_tr ); UTIL_TraceLine( beam_tr.vecEndPos, tr.vecEndPos, dont_ignore_monsters, pentIgnore, &beam_tr );
float n = (beam_tr.vecEndPos - tr.vecEndPos).Length( ); n = ( beam_tr.vecEndPos - tr.vecEndPos ).Length();
if( n < flDamage ) if( n < flDamage )
{ {

2
dlls/monsters.cpp

@ -1074,7 +1074,7 @@ int CBaseMonster::CheckEnemy( CBaseEntity *pEnemy )
{ {
// distance to enemy's feet // distance to enemy's feet
vecEnemyPos.z -= pEnemy->pev->size.z; vecEnemyPos.z -= pEnemy->pev->size.z;
float flDistToEnemy2 = ( vecEnemyPos - pev->origin ).Length(); flDistToEnemy2 = ( vecEnemyPos - pev->origin ).Length();
if( flDistToEnemy2 < flDistToEnemy ) if( flDistToEnemy2 < flDistToEnemy )
flDistToEnemy = flDistToEnemy2; flDistToEnemy = flDistToEnemy2;
} }

6
dlls/talkmonster.cpp

@ -466,12 +466,12 @@ void CTalkMonster::StartTask( Task_t *pTask )
void CTalkMonster::RunTask( Task_t *pTask ) void CTalkMonster::RunTask( Task_t *pTask )
{ {
edict_t *pPlayer;
switch( pTask->iTask ) switch( pTask->iTask )
{ {
case TASK_TLK_CLIENT_STARE: case TASK_TLK_CLIENT_STARE:
case TASK_TLK_LOOK_AT_CLIENT: case TASK_TLK_LOOK_AT_CLIENT:
edict_t *pPlayer;
// track head to the client for a while. // track head to the client for a while.
if( m_MonsterState == MONSTERSTATE_IDLE && if( m_MonsterState == MONSTERSTATE_IDLE &&
!IsMoving() && !IsMoving() &&
@ -517,7 +517,7 @@ void CTalkMonster::RunTask( Task_t *pTask )
case TASK_FACE_PLAYER: case TASK_FACE_PLAYER:
{ {
// Get edict for one player // Get edict for one player
edict_t *pPlayer = g_engfuncs.pfnPEntityOfEntIndex( 1 ); pPlayer = g_engfuncs.pfnPEntityOfEntIndex( 1 );
if( pPlayer ) if( pPlayer )
{ {

4
dlls/util.cpp

@ -1794,7 +1794,7 @@ void CSave::WriteFloat( const char *pname, const float *data, int count )
void CSave::WriteTime( const char *pname, const float *data, int count ) void CSave::WriteTime( const char *pname, const float *data, int count )
{ {
int i; int i;
Vector tmp, input; //Vector tmp, input;
BufferHeader( pname, sizeof(float) * count ); BufferHeader( pname, sizeof(float) * count );
for( i = 0; i < count; i++ ) for( i = 0; i < count; i++ )
@ -1871,7 +1871,7 @@ void CSave::WritePositionVector( const char *pname, const Vector &value )
void CSave::WritePositionVector( const char *pname, const float *value, int count ) void CSave::WritePositionVector( const char *pname, const float *value, int count )
{ {
int i; int i;
Vector tmp, input; //Vector tmp, input;
BufferHeader( pname, sizeof(float) * 3 * count ); BufferHeader( pname, sizeof(float) * 3 * count );
for( i = 0; i < count; i++ ) for( i = 0; i < count; i++ )

Loading…
Cancel
Save