#ifdef->#if.

This commit is contained in:
Andrey Akhmichin 2021-06-14 11:05:49 +05:00
parent 810b8b11d8
commit d069212e0f
11 changed files with 41 additions and 41 deletions

View File

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

View File

@ -54,7 +54,7 @@ void CGlock::Spawn()
Precache();
m_iId = WEAPON_GLOCK;
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -137,7 +137,7 @@ void CGlock::Holster( int skiplocal /*= 0*/ )
void CGlock::SecondaryAttack()
{
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )

View File

@ -132,7 +132,7 @@ void CWeaponEinarAP9::AP9Fire( float flSpread, float flCycleTime, BOOL fUseAutoA
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -156,7 +156,7 @@ void CWeaponEinarAP9::AP9Fire( float flSpread, float flCycleTime, BOOL fUseAutoA
vecAiming = gpGlobals->v_forward;
}
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -184,7 +184,7 @@ void CWeaponEinarAP9::Reload()
if( DefaultReload( AP9_MAX_CLIP, AP9_RELOAD, 1.8 ) )
{
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( !bIsMultiplayer() )
#else
if( !g_pGameRules->IsMultiplayer() )

View File

@ -142,7 +142,7 @@ void CWeaponEinarChaingun::PrimaryAttack()
{
if( m_flNextPrimaryAttack <= UTIL_WeaponTimeBase() )
{
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( !bIsMultiplayer() )
#else
if( !g_pGameRules->IsMultiplayer() )

View File

@ -142,7 +142,7 @@ int CWeaponEinarShovel::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 );
@ -180,7 +180,7 @@ int CWeaponEinarShovel::Swing( int fFirst )
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
#endif
EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/cbar_miss1.wav", 1, ATTN_NORM, 0, 94 + RANDOM_LONG( 0, 0xF ) );
@ -204,7 +204,7 @@ int CWeaponEinarShovel::Swing( int fFirst )
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
// hit
fDidHit = TRUE;
@ -320,13 +320,13 @@ int CWeaponEinarShovel::Swing( int fFirst )
SetThink( &CWeaponEinarShovel::Smack );
pev->nextthink = UTIL_WeaponTimeBase() + 0.2f;
}
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
#endif
return fDidHit;
}
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
void CWeaponEinarShovel::WeaponIdle( void )
{
if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() )

View File

@ -119,7 +119,7 @@ void CWeaponEinarSniper::SecondaryAttack()
m_fInZoom = 1;
SetBits( iFadeFlags, FFADE_OUT | FFADE_STAYOUT );
}
#ifndef CLIENT_DLL
#if !CLIENT_DLL
UTIL_ScreenFade( m_pPlayer, Vector( 0, 255, 0 ), 0.0, 0.0, 70, iFadeFlags );
#endif
pev->nextthink = UTIL_WeaponTimeBase() + 0.11f;
@ -159,7 +159,7 @@ void CWeaponEinarSniper::PrimaryAttack()
Vector vecSrc = m_pPlayer->GetGunPosition();
Vector vecAiming = gpGlobals->v_forward;
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -192,7 +192,7 @@ void CWeaponEinarSniper::PrimaryAttack()
Vector vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, Vector( flSpread, flSpread, flSpread ), 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;

View File

@ -137,7 +137,7 @@ int CWeaponEinarSpanner::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 );
@ -171,7 +171,7 @@ int CWeaponEinarSpanner::Swing( int fFirst )
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.4f;
EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/cbar_miss1.wav", 1, ATTN_NORM, 0, 94 + RANDOM_LONG( 0, 0xF ) );
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
#endif
// player "shoot" animation
@ -192,7 +192,7 @@ int CWeaponEinarSpanner::Swing( int fFirst )
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
// hit
fDidHit = TRUE;
CBaseEntity *pEntity = CBaseEntity::Instance( tr.pHit );
@ -306,13 +306,13 @@ int CWeaponEinarSpanner::Swing( int fFirst )
SetThink( &CWeaponEinarSpanner::Smack );
pev->nextthink = UTIL_WeaponTimeBase() + 0.2f;
}
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
#endif
return fDidHit;
}
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
void CWeaponEinarSpanner::WeaponIdle()
{
if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() )

View File

@ -124,7 +124,7 @@ void CWeaponEinarTaurus::TaurusFire( float flSpread, float flCycleTime, BOOL fUs
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;

View File

@ -143,7 +143,7 @@ void CWeaponEinarTFCSniper::PrimaryAttack()
Vector vecSrc = m_pPlayer->GetGunPosition();
Vector vecAiming = gpGlobals->v_forward;
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -176,7 +176,7 @@ void CWeaponEinarTFCSniper::PrimaryAttack()
Vector vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, Vector( flSpread, flSpread, flSpread ), 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;
@ -215,7 +215,7 @@ void CWeaponEinarTFCSniper::SecondaryAttack()
m_fInZoom = 1;
SetBits( iFadeFlags, FFADE_OUT | FFADE_STAYOUT );
}
#ifndef CLIENT_DLL
#if !CLIENT_DLL
UTIL_ScreenFade( m_pPlayer, Vector( 0, 255, 0 ), 0.0, 0.0, 70, iFadeFlags );
#endif
pev->nextthink = UTIL_WeaponTimeBase() + 0.11f;

View File

@ -381,7 +381,7 @@ void W_Precache( void )
UTIL_PrecacheOtherWeapon( "weapon_th_taurus" );
UTIL_PrecacheOther( "ammo_th_taurus" );
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
if( g_pGameRules->IsDeathmatch() )
{
UTIL_PrecacheOther( "weaponbox" );// container for dropped deathmatch weapons

View File

@ -571,7 +571,7 @@ public:
void Holster( int skiplocal = 0 );
void Reload( void );
void WeaponIdle( void );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -1015,7 +1015,7 @@ public:
int Swing( int fFirst );
BOOL Deploy();
void Holster( int skiplocal = 0 );
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
void WeaponIdle();
#endif
int m_iSwing;
@ -1023,7 +1023,7 @@ public:
virtual BOOL UseDecrement()
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -1046,7 +1046,7 @@ public:
int Swing( int fFirst );
BOOL Deploy();
void Holster( int skiplocal = 0 );
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
void WeaponIdle();
#endif
int m_iSwing;
@ -1054,7 +1054,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -1065,7 +1065,7 @@ public:
class CWeaponEinarAP9 : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -1087,7 +1087,7 @@ public:
virtual BOOL UseDecrement()
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -1115,7 +1115,7 @@ public:
virtual BOOL UseDecrement()
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -1130,7 +1130,7 @@ private:
class CWeaponEinarSniper : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -1149,7 +1149,7 @@ public:
virtual BOOL UseDecrement()
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -1163,7 +1163,7 @@ private:
class CWeaponEinarTFCSniper : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -1182,7 +1182,7 @@ public:
virtual BOOL UseDecrement()
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -1196,7 +1196,7 @@ private:
class CWeaponEinarChaingun : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -1216,7 +1216,7 @@ public:
virtual BOOL UseDecrement()
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -1238,7 +1238,7 @@ private:
class CWeaponEinarMedkit : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -1261,7 +1261,7 @@ public:
virtual BOOL UseDecrement()
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;