From 728ff6ca4f4191fd72b92ef71cdd371d69ad4708 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Mon, 14 Jun 2021 06:09:47 +0500 Subject: [PATCH] #ifdef->#if. --- dlls/visitors/pipe.cpp | 16 ++++++++-------- dlls/visitors/sniper.cpp | 2 +- dlls/weapons.h | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/visitors/pipe.cpp b/dlls/visitors/pipe.cpp index a64c3dd1..fbe8b34f 100644 --- a/dlls/visitors/pipe.cpp +++ b/dlls/visitors/pipe.cpp @@ -38,7 +38,7 @@ enum pipe_e { PIPE_ATTACK2MISS, PIPE_ATTACK2HIT, PIPE_ATTACK3MISS, -#ifndef CROWBAR_IDLE_ANIM +#if !CROWBAR_IDLE_ANIM PIPE_ATTACK3HIT #else PIPE_ATTACK3HIT, @@ -117,7 +117,7 @@ void CPipe::PrimaryAttack() { if (!Swing(1)) { -#ifndef CLIENT_DLL +#if !CLIENT_DLL SetThink(&CPipe::SwingAgain); pev->nextthink = gpGlobals->time + 0.5f; #endif @@ -146,7 +146,7 @@ int CPipe::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); @@ -174,7 +174,7 @@ int CPipe::Swing(int fFirst) // miss m_flNextPrimaryAttack = GetNextAttackDelay(0.5); -#ifdef CROWBAR_IDLE_ANIM +#if CROWBAR_IDLE_ANIM m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); #endif // player "shoot" animation @@ -196,7 +196,7 @@ int CPipe::Swing(int fFirst) // player "shoot" animation m_pPlayer->SetAnimation(PLAYER_ATTACK1); -#ifndef CLIENT_DLL +#if !CLIENT_DLL // hit fDidHit = TRUE; @@ -207,7 +207,7 @@ int CPipe::Swing(int fFirst) // If building with the clientside weapon prediction system, // UTIL_WeaponTimeBase() is always 0 and m_flNextPrimaryAttack is >= -1.0f, thus making // m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() always evaluate to false. -#ifdef CLIENT_WEAPONS +#if CLIENT_WEAPONS if( ( m_flNextPrimaryAttack + 1 == UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) #else if( ( m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) @@ -288,13 +288,13 @@ int CPipe::Swing(int fFirst) #endif m_flNextPrimaryAttack = GetNextAttackDelay(0.5f); // 0.25f } -#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 CPipe::WeaponIdle() { if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() ) diff --git a/dlls/visitors/sniper.cpp b/dlls/visitors/sniper.cpp index c9a57b9d..1a4bc5d5 100644 --- a/dlls/visitors/sniper.cpp +++ b/dlls/visitors/sniper.cpp @@ -168,7 +168,7 @@ void CSniper::PrimaryAttack() vecDir = m_pPlayer->FireBulletsPlayer(1, vecSrc, vecAiming, VECTOR_CONE_1DEGREES, 8192, BULLET_PLAYER_SNIPER, 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/weapons.h b/dlls/weapons.h index 2f8da147..82cd62ac 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -535,7 +535,7 @@ private: class CPython : public CBasePlayerWeapon { public: -#ifndef CLIENT_DLL +#if !CLIENT_DLL int Save( CSave &save ); int Restore( CRestore &restore ); static TYPEDESCRIPTION m_SaveData[]; @@ -1033,7 +1033,7 @@ public: int Swing( int fFirst ); BOOL Deploy( void ); void Holster( int skiplocal = 0 ); -#ifdef CROWBAR_IDLE_ANIM +#if CROWBAR_IDLE_ANIM void WeaponIdle(); #endif int m_iSwing; @@ -1041,7 +1041,7 @@ public: virtual BOOL UseDecrement( void ) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE; @@ -1070,7 +1070,7 @@ public: virtual BOOL UseDecrement(void) { -#if defined( CLIENT_WEAPONS ) +#if CLIENT_WEAPONS return TRUE; #else return FALSE;