Fix -Wshadow.

This commit is contained in:
Night Owl 2016-08-02 23:16:24 +05:00
parent 932d269e74
commit a8b188e1d5
6 changed files with 11 additions and 12 deletions

View File

@ -1048,7 +1048,6 @@ void EV_FireGauss( event_args_t *args )
if( !beam_tr.allsolid )
{
vec3_t delta;
float n;
// trace backwards to find exit point
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 );
if(n < flDamage)
if( n < flDamage )
{
if(n == 0)
if( n == 0 )
n = 1;
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.
{
vec3_t vecSrc, vecEnd, origin, angles, forward, right, up;
vec3_t vecSrc, vecEnd, angles, forward, right, up;
pmtrace_t tr;
cl_entity_t *pl = gEngfuncs.GetEntityByIndex( idx );

View File

@ -191,7 +191,7 @@ void CMultiSource::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE
if( IsTriggered( pActivator ) )
{
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 )
useType = USE_ON;
SUB_UseTargets( NULL, useType, 0 );

View File

@ -469,7 +469,7 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage )
// trace backwards to find exit point
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 )
{

View File

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

View File

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

View File

@ -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 )
{
int i;
Vector tmp, input;
//Vector tmp, input;
BufferHeader( pname, sizeof(float) * count );
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 )
{
int i;
Vector tmp, input;
//Vector tmp, input;
BufferHeader( pname, sizeof(float) * 3 * count );
for( i = 0; i < count; i++ )