Browse Source

#ifdef->#if.

visitors
Andrey Akhmichin 4 years ago
parent
commit
728ff6ca4f
  1. 16
      dlls/visitors/pipe.cpp
  2. 2
      dlls/visitors/sniper.cpp
  3. 8
      dlls/weapons.h

16
dlls/visitors/pipe.cpp

@ -38,7 +38,7 @@ enum pipe_e { @@ -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() @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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() )

2
dlls/visitors/sniper.cpp

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

8
dlls/weapons.h

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

Loading…
Cancel
Save