Browse Source

#ifdef->#if.

zombie-x
Andrey Akhmichin 4 years ago
parent
commit
05ea3bc8ec
  1. 2
      cl_dll/hl/hl_weapons.cpp
  2. 2
      dlls/python.cpp
  3. 18
      dlls/weapons.h
  4. 12
      dlls/zx/ak47.cpp
  5. 2
      dlls/zx/apache_blackop.cpp
  6. 4
      dlls/zx/auto_shotgun.cpp
  7. 4
      dlls/zx/eagel.cpp
  8. 2
      dlls/zx/engine.cpp
  9. 4
      dlls/zx/hands.cpp
  10. 16
      dlls/zx/minigun.cpp
  11. 8
      dlls/zx/mp41a.cpp
  12. 57
      dlls/zx/op_eagle.cpp
  13. 8
      dlls/zx/shockgun.cpp
  14. 14
      dlls/zx/swort.cpp
  15. 4
      dlls/zx/uzi.cpp
  16. 12
      dlls/zx/waypoint.cpp

2
cl_dll/hl/hl_weapons.cpp

@ -1102,7 +1102,7 @@ void _DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s
{ {
g_runfuncs = runfuncs; g_runfuncs = runfuncs;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
if( cl_lw && cl_lw->value ) if( cl_lw && cl_lw->value )
{ {
HUD_WeaponsPostThink( from, to, cmd, time, random_seed ); HUD_WeaponsPostThink( from, to, cmd, time, random_seed );

2
dlls/python.cpp

@ -158,7 +158,7 @@ void CPython::SecondaryAttack( void )
vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_4DEGREES, 8192, BULLET_PLAYER_357, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed ); vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_4DEGREES, 8192, BULLET_PLAYER_357, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed );
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;

18
dlls/weapons.h

@ -563,7 +563,7 @@ public:
virtual BOOL UseDecrement( void ) virtual BOOL UseDecrement( void )
{ {
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
return TRUE; return TRUE;
#else #else
return FALSE; return FALSE;
@ -630,7 +630,7 @@ public:
virtual BOOL UseDecrement( void ) virtual BOOL UseDecrement( void )
{ {
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
return TRUE; return TRUE;
#else #else
return FALSE; return FALSE;
@ -723,7 +723,7 @@ public:
virtual BOOL UseDecrement( void ) virtual BOOL UseDecrement( void )
{ {
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
return TRUE; return TRUE;
#else #else
return FALSE; return FALSE;
@ -753,7 +753,7 @@ public:
virtual BOOL UseDecrement( void ) virtual BOOL UseDecrement( void )
{ {
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
return TRUE; return TRUE;
#else #else
return FALSE; return FALSE;
@ -783,7 +783,7 @@ public:
virtual BOOL UseDecrement( void ) virtual BOOL UseDecrement( void )
{ {
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
return TRUE; return TRUE;
#else #else
return FALSE; return FALSE;
@ -814,7 +814,7 @@ public:
virtual BOOL UseDecrement( void ) virtual BOOL UseDecrement( void )
{ {
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
return TRUE; return TRUE;
#else #else
return FALSE; return FALSE;
@ -904,7 +904,7 @@ private:
class CShotgunA : public CBasePlayerWeapon class CShotgunA : public CBasePlayerWeapon
{ {
public: public:
#ifndef CLIENT_DLL #if !CLIENT_DLL
int Save( CSave &save ); int Save( CSave &save );
int Restore( CRestore &restore ); int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[]; static TYPEDESCRIPTION m_SaveData[];
@ -928,7 +928,7 @@ public:
virtual BOOL UseDecrement( void ) virtual BOOL UseDecrement( void )
{ {
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
return TRUE; return TRUE;
#else #else
return FALSE; return FALSE;
@ -1196,7 +1196,7 @@ public:
virtual BOOL UseDecrement( void ) virtual BOOL UseDecrement( void )
{ {
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
return TRUE; return TRUE;
#else #else
return FALSE; return FALSE;

12
dlls/zx/ak47.cpp

@ -136,7 +136,7 @@ void Cak47::PrimaryAttack()
Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
Vector vecDir; Vector vecDir;
#ifdef CLIENT_DLL #if CLIENT_DLL
if( bIsMultiplayer() ) if( bIsMultiplayer() )
#else #else
if( g_pGameRules->IsMultiplayer() ) if( g_pGameRules->IsMultiplayer() )
@ -151,8 +151,8 @@ void Cak47::PrimaryAttack()
vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed ); vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed );
} }
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
@ -206,7 +206,7 @@ void Cak47::SecondaryAttack( void )
Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
Vector vecDir; Vector vecDir;
#ifdef CLIENT_DLL #if CLIENT_DLL
if( bIsMultiplayer() ) if( bIsMultiplayer() )
#else #else
if( g_pGameRules->IsMultiplayer() ) if( g_pGameRules->IsMultiplayer() )
@ -221,8 +221,8 @@ void Cak47::SecondaryAttack( void )
vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_1DEGREES, 8192, BULLET_PLAYER_MP5, 1, 0, m_pPlayer->pev, m_pPlayer->random_seed ); vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_1DEGREES, 8192, BULLET_PLAYER_MP5, 1, 0, m_pPlayer->pev, m_pPlayer->random_seed );
} }
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;

2
dlls/zx/apache_blackop.cpp

@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal. * use or distribution of this code by or to any unlicensed person is illegal.
* *
****/ ****/
#ifndef OEM_BUILD #if !OEM_BUILD
#include "extdll.h" #include "extdll.h"
#include "util.h" #include "util.h"

4
dlls/zx/auto_shotgun.cpp

@ -153,7 +153,7 @@ void CShotgunA::PrimaryAttack()
m_iClip--; m_iClip--;
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
@ -167,7 +167,7 @@ void CShotgunA::PrimaryAttack()
Vector vecDir; Vector vecDir;
#ifdef CLIENT_DLL #if CLIENT_DLL
if ( bIsMultiplayer() ) if ( bIsMultiplayer() )
#else #else
if ( g_pGameRules->IsMultiplayer() ) if ( g_pGameRules->IsMultiplayer() )

4
dlls/zx/eagel.cpp

@ -100,7 +100,7 @@ int CEagel::AddToPlayer( CBasePlayer *pPlayer )
BOOL CEagel::Deploy( ) BOOL CEagel::Deploy( )
{ {
#ifdef CLIENT_DLL #if CLIENT_DLL
if ( bIsMultiplayer() ) if ( bIsMultiplayer() )
#else #else
if ( g_pGameRules->IsMultiplayer() ) if ( g_pGameRules->IsMultiplayer() )
@ -172,7 +172,7 @@ void CEagel::EagelFire( float flSpread, float flCycleTime, BOOL fUseAutoAim )
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;

2
dlls/zx/engine.cpp

@ -859,7 +859,7 @@ int pfnRegUserMsg(const char *pszName, int iSize)
if (gpGlobals->deathmatch) if (gpGlobals->deathmatch)
{ {
#ifdef _DEBUG #if _DEBUG
fp=fopen("HPB_bot.txt","a"); fprintf(fp,"pfnRegUserMsg: pszName=%s msg=%d\n",pszName,msg); fclose(fp); fp=fopen("HPB_bot.txt","a"); fprintf(fp,"pfnRegUserMsg: pszName=%s msg=%d\n",pszName,msg); fclose(fp);
#endif #endif

4
dlls/zx/hands.cpp

@ -179,7 +179,7 @@ int CHands::Swing( int fFirst )
UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr );
#ifndef CLIENT_DLL #if !CLIENT_DLL
if ( tr.flFraction >= 1.0 ) if ( tr.flFraction >= 1.0 )
{ {
UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr );
@ -226,7 +226,7 @@ int CHands::Swing( int fFirst )
// player "shoot" animation // player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#ifndef CLIENT_DLL #if !CLIENT_DLL
// hit // hit
fDidHit = TRUE; fDidHit = TRUE;

16
dlls/zx/minigun.cpp

@ -144,7 +144,7 @@ void CMinigun::PrimaryAttack()
Vector vecDir; Vector vecDir;
#ifdef CLIENT_DLL #if CLIENT_DLL
if( bIsMultiplayer() ) if( bIsMultiplayer() )
#else #else
if( g_pGameRules->IsMultiplayer() ) if( g_pGameRules->IsMultiplayer() )
@ -160,7 +160,7 @@ void CMinigun::PrimaryAttack()
} }
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
@ -177,9 +177,9 @@ void CMinigun::PrimaryAttack()
if ( m_flNextPrimaryAttack < UTIL_WeaponTimeBase() ) if ( m_flNextPrimaryAttack < UTIL_WeaponTimeBase() )
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.05f; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.05f;
#ifndef CLIENT_DLL #if !CLIENT_DLL
UTIL_ScreenShake( pev->origin, 5.0, 150.0, 0.75, 250.0 ); UTIL_ScreenShake( pev->origin, 5.0, 150.0, 0.75, 250.0 );
#endif #endif
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
@ -218,7 +218,7 @@ void CMinigun::SecondaryAttack( void )
Vector vecDir; Vector vecDir;
#ifdef CLIENT_DLL #if CLIENT_DLL
if( bIsMultiplayer() ) if( bIsMultiplayer() )
#else #else
if( g_pGameRules->IsMultiplayer() ) if( g_pGameRules->IsMultiplayer() )
@ -233,8 +233,8 @@ void CMinigun::SecondaryAttack( void )
vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_20DEGREES, 8192, BULLET_PLAYER_50CAL, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed ); vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_20DEGREES, 8192, BULLET_PLAYER_50CAL, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed );
} }
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
@ -251,7 +251,7 @@ void CMinigun::SecondaryAttack( void )
if ( m_flNextSecondaryAttack < UTIL_WeaponTimeBase() ) if ( m_flNextSecondaryAttack < UTIL_WeaponTimeBase() )
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.01f; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.01f;
#ifndef CLIENT_DLL #if !CLIENT_DLL
UTIL_ScreenShake( pev->origin, 5.0, 150.0, 0.75, 250.0 ); UTIL_ScreenShake( pev->origin, 5.0, 150.0, 0.75, 250.0 );
#endif #endif

8
dlls/zx/mp41a.cpp

@ -158,7 +158,7 @@ void CMP41a::PrimaryAttack()
Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
Vector vecDir; Vector vecDir;
#ifdef CLIENT_DLL #if CLIENT_DLL
if( bIsMultiplayer() ) if( bIsMultiplayer() )
#else #else
if( g_pGameRules->IsMultiplayer() ) if( g_pGameRules->IsMultiplayer() )
@ -173,8 +173,8 @@ void CMP41a::PrimaryAttack()
vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed ); vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, 0, m_pPlayer->pev, m_pPlayer->random_seed );
} }
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
@ -231,7 +231,7 @@ void CMP41a::SecondaryAttack( void )
gpGlobals->v_forward * 800 ); gpGlobals->v_forward * 800 );
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;

57
dlls/zx/op_eagle.cpp

@ -101,7 +101,7 @@ void CEagle::SecondaryAttack( void )
{ {
m_fDotActive = ! m_fDotActive; m_fDotActive = ! m_fDotActive;
#ifndef CLIENT_DLL #if !CLIENT_DLL
if (!m_fDotActive && m_pDot) if (!m_fDotActive && m_pDot)
{ {
m_pDot->Killed( NULL, GIB_NORMAL ); m_pDot->Killed( NULL, GIB_NORMAL );
@ -125,7 +125,7 @@ void CEagle::Holster( int skiplocal /* = 0 */ )
{ {
m_fInReload = FALSE;// cancel any reload in progress. m_fInReload = FALSE;// cancel any reload in progress.
#ifndef CLIENT_DLL #if !CLIENT_DLL
if (m_pDot) if (m_pDot)
{ {
m_pDot->Killed( NULL, GIB_NEVER ); m_pDot->Killed( NULL, GIB_NEVER );
@ -166,45 +166,44 @@ void CEagle::EagleFire( float flCycleTime, BOOL fUseAutoAim )
m_pPlayer->pev->effects = (int)(m_pPlayer->pev->effects) | EF_MUZZLEFLASH; m_pPlayer->pev->effects = (int)(m_pPlayer->pev->effects) | EF_MUZZLEFLASH;
#if defined ( OLD_WEAPONS ) #if OLD_WEAPONS
if (m_iClip != 0) if (m_iClip != 0)
SendWeaponAnim( EAGLE_FIRE ); SendWeaponAnim( EAGLE_FIRE );
else else
SendWeaponAnim( EAGLE_FIRE_EMPTY ); SendWeaponAnim( EAGLE_FIRE_EMPTY );
#endif #endif
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
#endif #endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), fUseAutoAim ? m_usFireEagle : m_usFireEagle, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), fUseAutoAim ? m_usFireEagle : m_usFireEagle, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 );
// player "shoot" animation // player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#if defined ( OLD_WEAPONS ) #if OLD_WEAPONS
UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle ); UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle );
UTIL_Ricochet( ptr->vecStartPos, 1.0 ); UTIL_Ricochet( ptr->vecStartPos, 1.0 );
UTIL_Ricochet( ptr->vecEndPos, 2.0 ); // ADDED RICHOSHET MODE UTIL_Ricochet( ptr->vecEndPos, 2.0 ); // ADDED RICHOSHET MODE
+ gpGlobals->v_right * RANDOM_FLOAT(9999,100) + gpGlobals->v_right * RANDOM_FLOAT(9999,100)
Vector vecShellVelocity = m_pPlayer->pev->velocity Vector vecShellVelocity = m_pPlayer->pev->velocity
+ gpGlobals->v_right * RANDOM_FLOAT(999,300) + gpGlobals->v_right * RANDOM_FLOAT(999,300)
+ gpGlobals->v_up * RANDOM_FLOAT(450,150) + gpGlobals->v_up * RANDOM_FLOAT(450,150)
+ gpGlobals->v_forward * 9999; + gpGlobals->v_forward * 9999;
#endif #endif
if (pev->body == 0) if (pev->body == 0)
{ {
m_pPlayer->m_iWeaponVolume = QUIET_GUN_VOLUME; m_pPlayer->m_iWeaponVolume = QUIET_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH; m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
#if defined ( OLD_WEAPONS ) #if OLD_WEAPONS
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/desert_eagle_fire.wav", RANDOM_FLOAT(0.9, 1.0), ATTN_NORM);
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/desert_eagle_fire.wav", RANDOM_FLOAT(0.9, 1.0), ATTN_NORM);
#endif #endif
} }
Vector vecSrc = m_pPlayer->GetGunPosition( ); Vector vecSrc = m_pPlayer->GetGunPosition( );
Vector vecAiming; Vector vecAiming;
@ -236,7 +235,7 @@ m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->
UpdateDot( ); UpdateDot( );
#if defined ( OLD_WEAPONS ) #if OLD_WEAPONS
m_pPlayer->pev->punchangle.x -= 2; m_pPlayer->pev->punchangle.x -= 2;
#endif #endif
} }
@ -316,7 +315,7 @@ void CEagle::WeaponIdle( void )
void CEagle::UpdateDot( void ) void CEagle::UpdateDot( void )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
if (m_fDotActive) if (m_fDotActive)
{ {
if (!m_pDot) if (!m_pDot)

8
dlls/zx/shockgun.cpp

@ -88,7 +88,7 @@ int CShockRifle::AddToPlayer( CBasePlayer *pPlayer )
if ( CBasePlayerWeapon::AddToPlayer( pPlayer ) ) if ( CBasePlayerWeapon::AddToPlayer( pPlayer ) )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
if ( g_pGameRules->IsMultiplayer() ) if ( g_pGameRules->IsMultiplayer() )
{ {
// in multiplayer, all shockroaches come full. // in multiplayer, all shockroaches come full.
@ -132,7 +132,7 @@ void CShockRifle::PrimaryAttack()
if (m_pPlayer->pev->waterlevel == 3) if (m_pPlayer->pev->waterlevel == 3)
{ {
TraceResult tr; TraceResult tr;
#ifndef CLIENT_DLL #if !CLIENT_DLL
m_pPlayer->TakeDamage( VARS(eoNullEntity), VARS(eoNullEntity), 255, DMG_SHOCK ); m_pPlayer->TakeDamage( VARS(eoNullEntity), VARS(eoNullEntity), 255, DMG_SHOCK );
UTIL_ScreenFade( m_pPlayer, Vector(201,236,255), 2, 0.5, 128, FFADE_IN ); UTIL_ScreenFade( m_pPlayer, Vector(201,236,255), 2, 0.5, 128, FFADE_IN );
#endif #endif
@ -144,7 +144,7 @@ void CShockRifle::PrimaryAttack()
return; return;
} }
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
@ -166,7 +166,7 @@ void CShockRifle::PrimaryAttack()
Vector vecSrc = m_pPlayer->GetGunPosition( )+ gpGlobals->v_forward * 16 + gpGlobals->v_right * 16 + gpGlobals->v_up * -12; Vector vecSrc = m_pPlayer->GetGunPosition( )+ gpGlobals->v_forward * 16 + gpGlobals->v_right * 16 + gpGlobals->v_up * -12;
#ifndef CLIENT_DLL #if !CLIENT_DLL
CBaseEntity *pShock = CBaseEntity::Create( "shock", vecSrc, anglesAim, m_pPlayer->edict() ); CBaseEntity *pShock = CBaseEntity::Create( "shock", vecSrc, anglesAim, m_pPlayer->edict() );
pShock->pev->velocity = gpGlobals->v_forward * 1500; pShock->pev->velocity = gpGlobals->v_forward * 1500;

14
dlls/zx/swort.cpp

@ -40,7 +40,7 @@ enum swort_e
SWORT_ATTACK2MISS, SWORT_ATTACK2MISS,
SWORT_ATTACK2HIT, SWORT_ATTACK2HIT,
SWORT_ATTACK3MISS, SWORT_ATTACK3MISS,
#ifndef CROWBAR_IDLE_ANIM #if !CROWBAR_IDLE_ANIM
SWORT_ATTACK3HIT SWORT_ATTACK3HIT
#else #else
SWORT_ATTACK3HIT, SWORT_ATTACK3HIT,
@ -196,7 +196,7 @@ int CSwort::Swing( int fFirst )
UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr );
#ifndef CLIENT_DLL #if !CLIENT_DLL
if ( tr.flFraction >= 1.0f ) if ( tr.flFraction >= 1.0f )
{ {
UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr );
@ -225,7 +225,7 @@ int CSwort::Swing( int fFirst )
{ {
// miss // miss
m_flNextPrimaryAttack = GetNextAttackDelay( 0.5f ); m_flNextPrimaryAttack = GetNextAttackDelay( 0.5f );
#ifdef CROWBAR_IDLE_ANIM #if CROWBAR_IDLE_ANIM
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
#endif #endif
// player "shoot" animation // player "shoot" animation
@ -247,7 +247,7 @@ int CSwort::Swing( int fFirst )
// player "shoot" animation // player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#ifndef CLIENT_DLL #if !CLIENT_DLL
// hit // hit
fDidHit = TRUE; fDidHit = TRUE;
@ -263,7 +263,7 @@ int CSwort::Swing( int fFirst )
// If building with the clientside weapon prediction system, // If building with the clientside weapon prediction system,
// UTIL_WeaponTimeBase() is always 0 and m_flNextPrimaryAttack is >= -1.0f, thus making // UTIL_WeaponTimeBase() is always 0 and m_flNextPrimaryAttack is >= -1.0f, thus making
// m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() always evaluate to false. // m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() always evaluate to false.
#ifdef CLIENT_WEAPONS #if CLIENT_WEAPONS
if( ( m_flNextPrimaryAttack + 1 == UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) if( ( m_flNextPrimaryAttack + 1 == UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() )
#else #else
if( ( m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) if( ( m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() )
@ -343,13 +343,13 @@ int CSwort::Swing( int fFirst )
} }
#ifdef CROWBAR_IDLE_ANIM #if CROWBAR_IDLE_ANIM
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
#endif #endif
return fDidHit; return fDidHit;
} }
#ifdef CROWBAR_IDLE_ANIM #if CROWBAR_IDLE_ANIM
void CSwort::WeaponIdle( void ) void CSwort::WeaponIdle( void )
{ {
if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() ) if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() )

4
dlls/zx/uzi.cpp

@ -146,7 +146,7 @@ void CUZI::PrimaryAttack()
Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
Vector vecDir; Vector vecDir;
#ifdef CLIENT_DLL #if CLIENT_DLL
if( bIsMultiplayer() ) if( bIsMultiplayer() )
#else #else
if( g_pGameRules->IsMultiplayer() ) if( g_pGameRules->IsMultiplayer() )
@ -162,7 +162,7 @@ void CUZI::PrimaryAttack()
} }
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;

12
dlls/zx/waypoint.cpp

@ -91,7 +91,7 @@ void WaypointFree(void)
free(p); free(p);
p = p_next; p = p_next;
#ifdef _DEBUG #if _DEBUG
count++; count++;
if (count > 1000) WaypointDebug(); if (count > 1000) WaypointDebug();
#endif #endif
@ -174,7 +174,7 @@ void WaypointAddPath(short int add_index, short int path_index)
prev = p; // save the previous node in linked list prev = p; // save the previous node in linked list
p = p->next; // go to next node in linked list p = p->next; // go to next node in linked list
#ifdef _DEBUG #if _DEBUG
count++; count++;
if (count > 100) WaypointDebug(); if (count > 100) WaypointDebug();
#endif #endif
@ -230,7 +230,7 @@ void WaypointDeletePath(short int del_index)
p = p->next; // go to next node in linked list p = p->next; // go to next node in linked list
#ifdef _DEBUG #if _DEBUG
count++; count++;
if (count > 100) WaypointDebug(); if (count > 100) WaypointDebug();
#endif #endif
@ -264,7 +264,7 @@ void WaypointDeletePath(short int path_index, short int del_index)
p = p->next; // go to next node in linked list p = p->next; // go to next node in linked list
#ifdef _DEBUG #if _DEBUG
count++; count++;
if (count > 100) WaypointDebug(); if (count > 100) WaypointDebug();
#endif #endif
@ -322,7 +322,7 @@ int WaypointFindPath(PATH **pPath, int *path_index, int waypoint_index, int team
*pPath = (*pPath)->next; // go to next node in linked list *pPath = (*pPath)->next; // go to next node in linked list
#ifdef _DEBUG #if _DEBUG
count++; count++;
if (count > 100) WaypointDebug(); if (count > 100) WaypointDebug();
#endif #endif
@ -1135,7 +1135,7 @@ void WaypointDelete(edict_t *pEntity)
free(p); free(p);
p = p_next; p = p_next;
#ifdef _DEBUG #if _DEBUG
count++; count++;
if (count > 100) WaypointDebug(); if (count > 100) WaypointDebug();
#endif #endif

Loading…
Cancel
Save