diff --git a/dlls/bigmomma.cpp b/dlls/bigmomma.cpp index 584a6737..62188740 100644 --- a/dlls/bigmomma.cpp +++ b/dlls/bigmomma.cpp @@ -12,7 +12,7 @@ * use or distribution of this code by or to any unlicensed person is illegal. * ****/ -#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) +#if !OEM_BUILD && !HLDEMO_BUILD //========================================================= // monster template diff --git a/dlls/client.cpp b/dlls/client.cpp index 9299e2f9..52c9644d 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -1626,7 +1626,7 @@ void RegisterEncoders( void ) int GetWeaponData( struct edict_s *player, struct weapon_data_s *info ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS int i; weapon_data_t *item; entvars_t *pev = &player->v; @@ -1755,7 +1755,7 @@ void UpdateClientData( const struct edict_s *ent, int sendweapons, struct client cd->iuser1 = pev->iuser1; cd->iuser2 = pev->iuser2; } -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS if( sendweapons ) { if( pl ) diff --git a/dlls/controller.cpp b/dlls/controller.cpp index 1f851766..20c9a502 100644 --- a/dlls/controller.cpp +++ b/dlls/controller.cpp @@ -12,7 +12,7 @@ * use or distribution of this code by or to any unlicensed person is illegal. * ****/ -#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) +#if !OEM_BUILD && !HLDEMO_BUILD //========================================================= // CONTROLLER diff --git a/dlls/crossbow.cpp b/dlls/crossbow.cpp index 87e4bbc8..68f4ba9c 100644 --- a/dlls/crossbow.cpp +++ b/dlls/crossbow.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" @@ -368,7 +368,7 @@ void CCrossbow::FireSniperBolt() m_iClip--; int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; @@ -411,7 +411,7 @@ void CCrossbow::FireBolt() m_iClip--; int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/egon.cpp b/dlls/egon.cpp index c6a61f01..efbe4449 100644 --- a/dlls/egon.cpp +++ b/dlls/egon.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" @@ -178,7 +178,7 @@ void CEgon::Attack( void ) Vector vecSrc = m_pPlayer->GetGunPosition(); int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/gauss.cpp b/dlls/gauss.cpp index 910de214..6c4c0a08 100644 --- a/dlls/gauss.cpp +++ b/dlls/gauss.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" diff --git a/dlls/glock.cpp b/dlls/glock.cpp index db0cf082..d9411d66 100644 --- a/dlls/glock.cpp +++ b/dlls/glock.cpp @@ -132,7 +132,7 @@ void CGlock::GlockFire( float flSpread, float flCycleTime, BOOL fUseAutoAim ) m_pPlayer->pev->effects = (int)( m_pPlayer->pev->effects ) | EF_MUZZLEFLASH; int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/hassassin.cpp b/dlls/hassassin.cpp index c98c940f..36672d56 100644 --- a/dlls/hassassin.cpp +++ b/dlls/hassassin.cpp @@ -12,7 +12,7 @@ * use or distribution of this code by or to any unlicensed person is illegal. * ****/ -#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) +#if !OEM_BUILD && !HLDEMO_BUILD //========================================================= // hassassin - Human assassin, fast and stealthy diff --git a/dlls/hornetgun.cpp b/dlls/hornetgun.cpp index df2eb3b6..f8c54fbe 100644 --- a/dlls/hornetgun.cpp +++ b/dlls/hornetgun.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" @@ -145,7 +145,7 @@ void CHgun::PrimaryAttack() m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH; int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; @@ -226,7 +226,7 @@ void CHgun::SecondaryAttack( void ) m_flRechargeTime = gpGlobals->time + 0.5f; #endif int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/ichthyosaur.cpp b/dlls/ichthyosaur.cpp index 56ff96af..0f9fbf5a 100644 --- a/dlls/ichthyosaur.cpp +++ b/dlls/ichthyosaur.cpp @@ -12,7 +12,7 @@ * use or distribution of this code by or to any unlicensed person is illegal. * ****/ -#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) +#if !OEM_BUILD && !HLDEMO_BUILD //========================================================= // icthyosaur - evin, satan fish monster diff --git a/dlls/mp5.cpp b/dlls/mp5.cpp index 66d0521b..2b2d07ab 100644 --- a/dlls/mp5.cpp +++ b/dlls/mp5.cpp @@ -166,7 +166,7 @@ void CMP5::PrimaryAttack() } int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; @@ -220,7 +220,7 @@ void CMP5::SecondaryAttack( void ) gpGlobals->v_forward * 800.0f ); int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/nihilanth.cpp b/dlls/nihilanth.cpp index 29e1073e..951ee38c 100644 --- a/dlls/nihilanth.cpp +++ b/dlls/nihilanth.cpp @@ -12,7 +12,7 @@ * use or distribution of this code by or to any unlicensed person is illegal. * ****/ -#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) +#if !OEM_BUILD && !HLDEMO_BUILD #include "extdll.h" #include "util.h" diff --git a/dlls/player.cpp b/dlls/player.cpp index ee21a24d..002635c0 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -2603,7 +2603,7 @@ pt_end: // Track button info so we can detect 'pressed' and 'released' buttons next frame m_afButtonLast = pev->button; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS // Decay timers on weapons // go through all of the weapons and make a list of the ones to pack for( int i = 0; i < MAX_ITEM_TYPES; i++ ) @@ -2998,7 +2998,7 @@ int CBasePlayer::Restore( CRestore &restore ) RenewItems(); -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS // HACK: This variable is saved/restored in CBaseMonster as a time variable, but we're using it // as just a counter. Ideally, this needs its own variable that's saved as a plain float. // Barring that, we clear it out here instead of using the incorrect restored time value. @@ -3433,7 +3433,7 @@ void CBasePlayer::ImpulseCommands() //========================================================= void CBasePlayer::CheatImpulseCommands( int iImpulse ) { -#if !defined( HLDEMO_BUILD ) +#if !HLDEMO_BUILD if( g_flWeaponCheat == 0.0f ) { return; @@ -3756,7 +3756,7 @@ Called every frame by the player PreThink */ void CBasePlayer::ItemPreFrame() { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS if( m_flNextAttack > 0 ) #else if( gpGlobals->time < m_flNextAttack ) @@ -3786,7 +3786,7 @@ void CBasePlayer::ItemPostFrame() if( m_pTank != 0 ) return; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS if( m_flNextAttack > 0 ) #else if( gpGlobals->time < m_flNextAttack ) diff --git a/dlls/python.cpp b/dlls/python.cpp index f12253dc..567187c0 100644 --- a/dlls/python.cpp +++ b/dlls/python.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" @@ -195,7 +195,7 @@ void CPython::PrimaryAttack() vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_1DEGREES, 8192, BULLET_PLAYER_357, 0, 0, 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/rpg.cpp b/dlls/rpg.cpp index 597ed4f1..65f1bd49 100644 --- a/dlls/rpg.cpp +++ b/dlls/rpg.cpp @@ -12,7 +12,7 @@ * without written permission from Valve LLC. * ****/ -#if !defined( OEM_BUILD ) +#if !OEM_BUILD #include "extdll.h" #include "util.h" @@ -454,7 +454,7 @@ void CRpg::PrimaryAttack() // Ken signed up for this as a global change (sjb) int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/satchel.cpp b/dlls/satchel.cpp index f15e1800..528a3ba8 100644 --- a/dlls/satchel.cpp +++ b/dlls/satchel.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" diff --git a/dlls/shotgun.cpp b/dlls/shotgun.cpp index 30ccdab9..7b263a21 100644 --- a/dlls/shotgun.cpp +++ b/dlls/shotgun.cpp @@ -137,7 +137,7 @@ void CShotgun::PrimaryAttack() m_iClip--; int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; @@ -207,7 +207,7 @@ void CShotgun::SecondaryAttack( void ) m_iClip -= 2; int flags; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS flags = FEV_NOTHOST; #else flags = 0; diff --git a/dlls/squeakgrenade.cpp b/dlls/squeakgrenade.cpp index c852fd64..4bf2e3df 100644 --- a/dlls/squeakgrenade.cpp +++ b/dlls/squeakgrenade.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" diff --git a/dlls/tentacle.cpp b/dlls/tentacle.cpp index c860fcb3..685540d5 100644 --- a/dlls/tentacle.cpp +++ b/dlls/tentacle.cpp @@ -12,7 +12,7 @@ * use or distribution of this code by or to any unlicensed person is illegal. * ****/ -#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) +#if !OEM_BUILD && !HLDEMO_BUILD /* diff --git a/dlls/util.cpp b/dlls/util.cpp index 74689193..483d6748 100644 --- a/dlls/util.cpp +++ b/dlls/util.cpp @@ -33,7 +33,7 @@ float UTIL_WeaponTimeBase( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return 0.0f; #else return gpGlobals->time; diff --git a/dlls/util.h b/dlls/util.h index 6b6d2d7b..ad7981ad 100644 --- a/dlls/util.h +++ b/dlls/util.h @@ -35,7 +35,7 @@ extern globalvars_t *gpGlobals; // Use this instead of ALLOC_STRING on constant strings #define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset) -#if !defined XASH_64BIT || defined(CLIENT_DLL) +#if !defined(XASH_64BIT) || CLIENT_DLL #define MAKE_STRING(str) ((int)(long int)str - (int)(long int)STRING(0)) #else static inline int MAKE_STRING(const char *szValue) @@ -104,7 +104,7 @@ typedef int BOOL; // The _declspec forces them to be exported by name so we can do a lookup with GetProcAddress() // The function is used to intialize / allocate the object for the entity -#if defined(CLIENT_DLL) +#if CLIENT_DLL #define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) #else // CLIENT_DLL #define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) extern "C" EXPORT void mapClassName( entvars_t *pev ); void mapClassName( entvars_t *pev ) { GetClassPtr( (DLLClassName *)pev ); } diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp index 88c91a36..773213b3 100644 --- a/dlls/weapons.cpp +++ b/dlls/weapons.cpp @@ -320,7 +320,7 @@ void W_Precache( void ) // 9mm ammo box UTIL_PrecacheOther( "ammo_9mmbox" ); -#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) +#if !OEM_BUILD && !HLDEMO_BUILD // python UTIL_PrecacheOtherWeapon( "weapon_357" ); UTIL_PrecacheOther( "ammo_357" ); @@ -342,13 +342,13 @@ void W_Precache( void ) #endif // tripmine UTIL_PrecacheOtherWeapon( "weapon_tripmine" ); -#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) +#if !OEM_BUILD && !HLDEMO_BUILD // satchel charge UTIL_PrecacheOtherWeapon( "weapon_satchel" ); #endif // hand grenade UTIL_PrecacheOtherWeapon("weapon_handgrenade"); -#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) +#if !OEM_BUILD && !HLDEMO_BUILD // squeak grenade UTIL_PrecacheOtherWeapon( "weapon_snark" ); @@ -402,7 +402,7 @@ IMPLEMENT_SAVERESTORE( CBasePlayerItem, CBaseAnimating ) TYPEDESCRIPTION CBasePlayerWeapon::m_SaveData[] = { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS DEFINE_FIELD( CBasePlayerWeapon, m_flNextPrimaryAttack, FIELD_FLOAT ), DEFINE_FIELD( CBasePlayerWeapon, m_flNextSecondaryAttack, FIELD_FLOAT ), DEFINE_FIELD( CBasePlayerWeapon, m_flTimeWeaponIdle, FIELD_FLOAT ), @@ -586,7 +586,7 @@ void CBasePlayerItem::DefaultTouch( CBaseEntity *pOther ) BOOL CanAttack( float attack_time, float curtime, BOOL isPredicted ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS if( !isPredicted ) #else if( 1 ) @@ -826,7 +826,7 @@ void CBasePlayerWeapon::SendWeaponAnim( int iAnim, int skiplocal, int body ) m_pPlayer->pev->weaponanim = iAnim; -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS if( skiplocal && ENGINE_CANSKIP( m_pPlayer->edict() ) ) return; #endif diff --git a/dlls/weapons.h b/dlls/weapons.h index 833c08d6..86e4cec9 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -475,7 +475,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -512,7 +512,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -542,7 +542,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -573,7 +573,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -607,7 +607,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -645,7 +645,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -703,7 +703,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -767,7 +767,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -825,7 +825,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -874,7 +874,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -900,7 +900,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -934,7 +934,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -963,7 +963,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -991,7 +991,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE;