Browse Source

Got rid "defined".

hl_urbicide
Andrey Akhmichin 4 years ago
parent
commit
6d8e1c5d0c
  1. 2
      dlls/bigmomma.cpp
  2. 4
      dlls/client.cpp
  3. 2
      dlls/controller.cpp
  4. 6
      dlls/crossbow.cpp
  5. 4
      dlls/egon.cpp
  6. 2
      dlls/gauss.cpp
  7. 2
      dlls/glock.cpp
  8. 2
      dlls/hassassin.cpp
  9. 6
      dlls/hornetgun.cpp
  10. 2
      dlls/ichthyosaur.cpp
  11. 4
      dlls/mp5.cpp
  12. 2
      dlls/nihilanth.cpp
  13. 10
      dlls/player.cpp
  14. 4
      dlls/python.cpp
  15. 4
      dlls/rpg.cpp
  16. 2
      dlls/satchel.cpp
  17. 4
      dlls/shotgun.cpp
  18. 2
      dlls/squeakgrenade.cpp
  19. 2
      dlls/tentacle.cpp
  20. 2
      dlls/util.cpp
  21. 4
      dlls/util.h
  22. 12
      dlls/weapons.cpp
  23. 28
      dlls/weapons.h

2
dlls/bigmomma.cpp

@ -12,7 +12,7 @@ @@ -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

4
dlls/client.cpp

@ -1626,7 +1626,7 @@ void RegisterEncoders( void ) @@ -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 @@ -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 )

2
dlls/controller.cpp

@ -12,7 +12,7 @@ @@ -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

6
dlls/crossbow.cpp

@ -12,7 +12,7 @@ @@ -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() @@ -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() @@ -411,7 +411,7 @@ void CCrossbow::FireBolt()
m_iClip--;
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;

4
dlls/egon.cpp

@ -12,7 +12,7 @@ @@ -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 ) @@ -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;

2
dlls/gauss.cpp

@ -12,7 +12,7 @@ @@ -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"

2
dlls/glock.cpp

@ -132,7 +132,7 @@ void CGlock::GlockFire( float flSpread, float flCycleTime, BOOL fUseAutoAim ) @@ -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;

2
dlls/hassassin.cpp

@ -12,7 +12,7 @@ @@ -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

6
dlls/hornetgun.cpp

@ -12,7 +12,7 @@ @@ -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() @@ -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 ) @@ -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;

2
dlls/ichthyosaur.cpp

@ -12,7 +12,7 @@ @@ -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

4
dlls/mp5.cpp

@ -166,7 +166,7 @@ void CMP5::PrimaryAttack() @@ -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 ) @@ -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;

2
dlls/nihilanth.cpp

@ -12,7 +12,7 @@ @@ -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"

10
dlls/player.cpp

@ -2603,7 +2603,7 @@ pt_end: @@ -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 ) @@ -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() @@ -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 @@ -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() @@ -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 )

4
dlls/python.cpp

@ -12,7 +12,7 @@ @@ -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() @@ -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;

4
dlls/rpg.cpp

@ -12,7 +12,7 @@ @@ -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() @@ -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;

2
dlls/satchel.cpp

@ -12,7 +12,7 @@ @@ -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"

4
dlls/shotgun.cpp

@ -137,7 +137,7 @@ void CShotgun::PrimaryAttack() @@ -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 ) @@ -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;

2
dlls/squeakgrenade.cpp

@ -12,7 +12,7 @@ @@ -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"

2
dlls/tentacle.cpp

@ -12,7 +12,7 @@ @@ -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
/*

2
dlls/util.cpp

@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
float UTIL_WeaponTimeBase( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return 0.0f;
#else
return gpGlobals->time;

4
dlls/util.h

@ -35,7 +35,7 @@ extern globalvars_t *gpGlobals; @@ -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; @@ -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 ); }

12
dlls/weapons.cpp

@ -320,7 +320,7 @@ void W_Precache( void ) @@ -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 ) @@ -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 ) @@ -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 ) @@ -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 ) @@ -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

28
dlls/weapons.h

@ -475,7 +475,7 @@ public: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -991,7 +991,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;

Loading…
Cancel
Save