From 91fa611d0686ea7b3c0635cb93c0a5b1b76a3ce1 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Thu, 17 Jun 2021 01:43:27 +0500 Subject: [PATCH] #ifdef->#if. --- cl_dll/hl/hl_weapons.cpp | 2 +- dlls/aomdc/axe.cpp | 6 +++--- dlls/aomdc/beretta.cpp | 2 +- dlls/aomdc/deagle.cpp | 2 +- dlls/aomdc/glock.cpp | 2 +- dlls/aomdc/gmgeneral.cpp | 2 +- dlls/aomdc/hammer.cpp | 6 +++--- dlls/aomdc/knife.cpp | 6 +++--- dlls/aomdc/mp5k.cpp | 2 +- dlls/aomdc/p228.cpp | 2 +- dlls/aomdc/revolver.cpp | 6 +++--- dlls/aomdc/spear.cpp | 6 +++--- dlls/aomdc/uzi.cpp | 2 +- dlls/weapons.h | 3 +-- 14 files changed, 24 insertions(+), 25 deletions(-) diff --git a/cl_dll/hl/hl_weapons.cpp b/cl_dll/hl/hl_weapons.cpp index a9ec1dc7..730199fa 100644 --- a/cl_dll/hl/hl_weapons.cpp +++ b/cl_dll/hl/hl_weapons.cpp @@ -1031,7 +1031,7 @@ void _DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s { g_runfuncs = runfuncs; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS if( cl_lw && cl_lw->value ) { HUD_WeaponsPostThink( from, to, cmd, time, random_seed ); diff --git a/dlls/aomdc/axe.cpp b/dlls/aomdc/axe.cpp index 8745d06f..d22d8398 100644 --- a/dlls/aomdc/axe.cpp +++ b/dlls/aomdc/axe.cpp @@ -143,7 +143,7 @@ void CAxe::PrimaryAttack() { if (! Swing( 1 )) { -#ifndef CLIENT_DLL +#if !CLIENT_DLL SetThink(&CAxe:: SwingAgain ); SetNextThink( 0.1 ); #endif @@ -175,7 +175,7 @@ int CAxe::Swing( int fFirst ) UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); -#ifndef CLIENT_DLL +#if !CLIENT_DLL if ( tr.flFraction >= 1.0f ) { UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); @@ -214,7 +214,7 @@ int CAxe::Swing( int fFirst ) // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); -#ifndef CLIENT_DLL +#if !CLIENT_DLL // hit fDidHit = TRUE; diff --git a/dlls/aomdc/beretta.cpp b/dlls/aomdc/beretta.cpp index 46f651b1..6c2e689d 100644 --- a/dlls/aomdc/beretta.cpp +++ b/dlls/aomdc/beretta.cpp @@ -123,7 +123,7 @@ void CBeretta::PrimaryAttack( void ) int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/aomdc/deagle.cpp b/dlls/aomdc/deagle.cpp index baea25d3..c4beaa1a 100644 --- a/dlls/aomdc/deagle.cpp +++ b/dlls/aomdc/deagle.cpp @@ -117,7 +117,7 @@ void CDeagle::PrimaryAttack( void ) int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/aomdc/glock.cpp b/dlls/aomdc/glock.cpp index d1b865a8..e381a92a 100644 --- a/dlls/aomdc/glock.cpp +++ b/dlls/aomdc/glock.cpp @@ -136,7 +136,7 @@ void CGlock::GlockFire( float flSpread, float flCycleTime, BOOL fUseBurst ) int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/aomdc/gmgeneral.cpp b/dlls/aomdc/gmgeneral.cpp index 1baf7344..224099b7 100644 --- a/dlls/aomdc/gmgeneral.cpp +++ b/dlls/aomdc/gmgeneral.cpp @@ -134,7 +134,7 @@ void CGMGeneral::PrimaryAttack() Vector vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, gSkillData.plrDmgMP5K, m_pPlayer->pev, m_pPlayer->random_seed ); int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/aomdc/hammer.cpp b/dlls/aomdc/hammer.cpp index f402270b..e0518039 100644 --- a/dlls/aomdc/hammer.cpp +++ b/dlls/aomdc/hammer.cpp @@ -143,7 +143,7 @@ void CHammer::PrimaryAttack() { m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.7f; SendWeaponAnim( HAMMER_WHACK ); -#ifndef CLIENT_DLL +#if !CLIENT_DLL SetThink( &CHammer::BigWhackThink ); pev->nextthink = gpGlobals->time + 0.45f; #endif @@ -159,7 +159,7 @@ void CHammer::BigWhackThink() UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); -#ifndef CLIENT_DLL +#if !CLIENT_DLL if ( tr.flFraction >= 1.0f ) { UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); @@ -183,7 +183,7 @@ void CHammer::BigWhackThink() // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); -#ifndef CLIENT_DLL +#if !CLIENT_DLL // hit CBaseEntity *pEntity = CBaseEntity::Instance(tr.pHit); diff --git a/dlls/aomdc/knife.cpp b/dlls/aomdc/knife.cpp index 2d5b53c7..dbffe20e 100644 --- a/dlls/aomdc/knife.cpp +++ b/dlls/aomdc/knife.cpp @@ -154,7 +154,7 @@ void CKnife::PrimaryAttack() { if (! Swing( 1 )) { -#ifndef CLIENT_DLL +#if !CLIENT_DLL SetThink(&CKnife:: SwingAgain ); SetNextThink( 0.1 ); #endif @@ -186,7 +186,7 @@ int CKnife::Swing( int fFirst ) UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); -#ifndef CLIENT_DLL +#if !CLIENT_DLL if ( tr.flFraction >= 1.0f ) { UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); @@ -231,7 +231,7 @@ int CKnife::Swing( int fFirst ) // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); -#ifndef CLIENT_DLL +#if !CLIENT_DLL // hit fDidHit = TRUE; diff --git a/dlls/aomdc/mp5k.cpp b/dlls/aomdc/mp5k.cpp index 6dc34840..b12353c0 100644 --- a/dlls/aomdc/mp5k.cpp +++ b/dlls/aomdc/mp5k.cpp @@ -144,7 +144,7 @@ void CMP5K::PrimaryAttack() Vector vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, gSkillData.plrDmgMP5K, m_pPlayer->pev, m_pPlayer->random_seed ); int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/aomdc/p228.cpp b/dlls/aomdc/p228.cpp index 60230166..9ceefe3f 100644 --- a/dlls/aomdc/p228.cpp +++ b/dlls/aomdc/p228.cpp @@ -121,7 +121,7 @@ void CP228::PrimaryAttack( void ) int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/aomdc/revolver.cpp b/dlls/aomdc/revolver.cpp index bb1f374f..0bfd74fb 100644 --- a/dlls/aomdc/revolver.cpp +++ b/dlls/aomdc/revolver.cpp @@ -12,7 +12,7 @@ * without written permission from Valve LLC. * ****/ -#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) +#if !OEM_BUILD && !HLDEMO_BUILD #include "extdll.h" #include "util.h" @@ -130,8 +130,8 @@ void CRevolver::PrimaryAttack() Vector vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_1DEGREES, 8192, BULLET_PLAYER_357, 0, gSkillData.plrDmgRevolver, m_pPlayer->pev, m_pPlayer->random_seed ); - int flags; -#if defined( CLIENT_WEAPONS ) + int flags; +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/aomdc/spear.cpp b/dlls/aomdc/spear.cpp index 55b269dd..1ffb6ec6 100644 --- a/dlls/aomdc/spear.cpp +++ b/dlls/aomdc/spear.cpp @@ -151,7 +151,7 @@ void CSpear::PrimaryAttack() { SendWeaponAnim( SPEAR_ELECTROCUTE ); m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 2.34f; -#ifndef CLIENT_DLL +#if !CLIENT_DLL UTIL_ScreenFade( m_pPlayer, Vector( 255, 255, 255 ), 0.5, 0.0, 100, FFADE_IN ); m_pPlayer->TakeDamage(m_pPlayer->pev, m_pPlayer->pev, DAMAGE_AIM, DMG_GENERIC ); EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/spear_electrocute.wav", 1, ATTN_NORM); @@ -181,7 +181,7 @@ void CSpear::BigSpearStab() Vector vecEnd = vecSrc + gpGlobals->v_forward * 72; UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); -#ifndef CLIENT_DLL +#if !CLIENT_DLL if ( tr.flFraction >= 1.0f ) { UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); @@ -207,7 +207,7 @@ void CSpear::BigSpearStab() // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); -#ifndef CLIENT_DLL +#if !CLIENT_DLL // hit CBaseEntity *pEntity = CBaseEntity::Instance(tr.pHit); diff --git a/dlls/aomdc/uzi.cpp b/dlls/aomdc/uzi.cpp index d23f659e..09cec154 100644 --- a/dlls/aomdc/uzi.cpp +++ b/dlls/aomdc/uzi.cpp @@ -141,7 +141,7 @@ void CUzi::PrimaryAttack() Vector vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, gSkillData.plrDmgUzi, m_pPlayer->pev, m_pPlayer->random_seed ); int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/weapons.h b/dlls/weapons.h index b0347e06..23e14af2 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -756,8 +756,7 @@ private: class CShotgun : public CBasePlayerWeapon { public: - -#ifndef CLIENT_DLL +#if !CLIENT_DLL int Save( CSave &save ); int Restore( CRestore &restore ); static TYPEDESCRIPTION m_SaveData[];