Browse Source

#ifdef->#if.

theyhunger
Andrey Akhmichin 3 years ago
parent
commit
d069212e0f
  1. 2
      cl_dll/hl/hl_weapons.cpp
  2. 4
      dlls/glock.cpp
  3. 6
      dlls/hunger/ap9.cpp
  4. 2
      dlls/hunger/chaingun.cpp
  5. 10
      dlls/hunger/shovel.cpp
  6. 6
      dlls/hunger/sniper.cpp
  7. 10
      dlls/hunger/spanner.cpp
  8. 2
      dlls/hunger/taurus.cpp
  9. 6
      dlls/hunger/tfcsniper.cpp
  10. 2
      dlls/weapons.cpp
  11. 32
      dlls/weapons.h

2
cl_dll/hl/hl_weapons.cpp

@ -938,7 +938,7 @@ void _DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s @@ -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 );

4
dlls/glock.cpp

@ -54,7 +54,7 @@ void CGlock::Spawn() @@ -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*/ ) @@ -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() )

6
dlls/hunger/ap9.cpp

@ -132,7 +132,7 @@ void CWeaponEinarAP9::AP9Fire( float flSpread, float flCycleTime, BOOL fUseAutoA @@ -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 @@ -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() @@ -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() )

2
dlls/hunger/chaingun.cpp

@ -142,7 +142,7 @@ void CWeaponEinarChaingun::PrimaryAttack() @@ -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() )

10
dlls/hunger/shovel.cpp

@ -142,7 +142,7 @@ int CWeaponEinarShovel::Swing( int fFirst ) @@ -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 ) @@ -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 ) @@ -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 ) @@ -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() )

6
dlls/hunger/sniper.cpp

@ -119,7 +119,7 @@ void CWeaponEinarSniper::SecondaryAttack() @@ -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() @@ -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() @@ -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;

10
dlls/hunger/spanner.cpp

@ -137,7 +137,7 @@ int CWeaponEinarSpanner::Swing( int fFirst ) @@ -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 ) @@ -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 ) @@ -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 ) @@ -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() )

2
dlls/hunger/taurus.cpp

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

6
dlls/hunger/tfcsniper.cpp

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

2
dlls/weapons.cpp

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

32
dlls/weapons.h

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

Loading…
Cancel
Save