Remove unneeded checks.

This commit is contained in:
Night Owl 2018-01-27 18:35:38 +05:00
parent 65ef3a70fe
commit 6b646e952a
3 changed files with 7 additions and 7 deletions

View File

@ -425,11 +425,11 @@ void WeaponsResource::SelectSlot( int iSlot, int fAdvance, int iDirection )
if( gHUD.m_fPlayerDead || gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL ) )
return;
if ( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_SUIT ) ) ) )
/*if ( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_SUIT ) ) ) )
return;
if( ! ( gHUD.m_iWeaponBits & ~( 1 << ( WEAPON_SUIT ) ) ) )
return;
return;*/
WEAPON *p = NULL;
bool fastSwitch = CVAR_GET_FLOAT( "hud_fastswitch" ) != 0;
@ -833,8 +833,8 @@ int CHudAmmo::Draw( float flTime )
int a, x, y, r, g, b;
int AmmoWidth;
if( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_SUIT ) ) ) )
return 1;
// if( !( gHUD.m_iWeaponBits & ( 1 << ( WEAPON_SUIT ) ) ) )
// return 1;
if( ( gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL ) ) )
return 1;

View File

@ -187,7 +187,7 @@ void CWallHealth::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u
}
// if the player doesn't have the suit, or there is no juice left, make the deny noise
if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) )
if( m_iJuice <= 0 )
{
if( m_flSoundTime <= gpGlobals->time )
{

View File

@ -279,7 +279,7 @@ class CItemLongJump : public CItem
return FALSE;
}
if( ( pPlayer->pev->weapons & ( 1 << WEAPON_SUIT ) ) )
// if( ( pPlayer->pev->weapons & ( 1 << WEAPON_SUIT ) ) )
{
pPlayer->m_fLongJump = TRUE;// player now has longjump module
@ -292,7 +292,7 @@ class CItemLongJump : public CItem
EMIT_SOUND_SUIT( pPlayer->edict(), "!HEV_A1" ); // Play the longjump sound UNDONE: Kelly? correct sound?
return TRUE;
}
return FALSE;
// return FALSE;
}
};