From 6b646e952a986bfe591693b9a3ca965fefbd130c Mon Sep 17 00:00:00 2001 From: Night Owl Date: Sat, 27 Jan 2018 18:35:38 +0500 Subject: [PATCH] Remove unneeded checks. --- cl_dll/ammo.cpp | 8 ++++---- dlls/healthkit.cpp | 2 +- dlls/items.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cl_dll/ammo.cpp b/cl_dll/ammo.cpp index 83cba616..91578859 100644 --- a/cl_dll/ammo.cpp +++ b/cl_dll/ammo.cpp @@ -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; diff --git a/dlls/healthkit.cpp b/dlls/healthkit.cpp index 99d53d35..53d6784d 100644 --- a/dlls/healthkit.cpp +++ b/dlls/healthkit.cpp @@ -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 ) { diff --git a/dlls/items.cpp b/dlls/items.cpp index 94eb24f6..e5450174 100644 --- a/dlls/items.cpp +++ b/dlls/items.cpp @@ -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; } };