Browse Source

#ifdef->#if.

opforfixed
Andrey Akhmichin 4 years ago
parent
commit
08fb4e1379
  1. 8
      dlls/gearbox/ctf_gamerules.cpp
  2. 4
      dlls/gearbox/ctf_gamerules.h
  3. 12
      dlls/gearbox/displacer.cpp
  4. 12
      dlls/gearbox/eagle.cpp
  5. 4
      dlls/gearbox/gearbox_client.cpp
  6. 4
      dlls/gearbox/gearbox_utils.cpp
  7. 20
      dlls/gearbox/grapple.cpp
  8. 4
      dlls/gearbox/grapple_tonguetip.h
  9. 8
      dlls/gearbox/knife.cpp
  10. 6
      dlls/gearbox/m249.cpp
  11. 8
      dlls/gearbox/penguin.cpp
  12. 12
      dlls/gearbox/pipewrench.cpp
  13. 22
      dlls/gearbox/shockrifle.cpp
  14. 4
      dlls/gearbox/sniperrifle.cpp
  15. 10
      dlls/gearbox/sporelauncher.cpp
  16. 34
      dlls/weapons.h

8
dlls/gearbox/ctf_gamerules.cpp

@ -74,7 +74,7 @@ edict_t *EntSelectSpawnPoint(CBaseEntity *pPlayer, bool bCheckDM)
#endif #endif
extern edict_t *RuneSelectSpawnPoint(void); extern edict_t *RuneSelectSpawnPoint(void);
#ifndef NO_VOICEGAMEMGR #if !NO_VOICEGAMEMGR
class CCTFGameMgrHelper : public IVoiceGameMgrHelper class CCTFGameMgrHelper : public IVoiceGameMgrHelper
{ {
public: public:
@ -98,7 +98,7 @@ const char* GetTeamName(int team)
CCTFMultiplay::CCTFMultiplay() CCTFMultiplay::CCTFMultiplay()
{ {
#ifndef NO_VOICEGAMEMGR #if !NO_VOICEGAMEMGR
// CHalfLifeMultiplay already initialized it - just override its helper callback. // CHalfLifeMultiplay already initialized it - just override its helper callback.
m_VoiceGameMgr.SetHelper(&g_GameMgrHelper); m_VoiceGameMgr.SetHelper(&g_GameMgrHelper);
#endif #endif
@ -150,7 +150,7 @@ extern cvar_t timeleft, fragsleft;
void CCTFMultiplay::Think(void) void CCTFMultiplay::Think(void)
{ {
#ifndef NO_VOICEGAMEMGR #if !NO_VOICEGAMEMGR
m_VoiceGameMgr.Update(gpGlobals->frametime); m_VoiceGameMgr.Update(gpGlobals->frametime);
#endif #endif
///// Check game rules ///// ///// Check game rules /////
@ -312,7 +312,7 @@ void DropRune(CBasePlayer *pPlayer);
//========================================================= //=========================================================
BOOL CCTFMultiplay::ClientCommand(CBasePlayer *pPlayer, const char *pcmd) BOOL CCTFMultiplay::ClientCommand(CBasePlayer *pPlayer, const char *pcmd)
{ {
#ifndef NO_VOICEGAMEMGR #if !NO_VOICEGAMEMGR
if (m_VoiceGameMgr.ClientCommand(pPlayer, pcmd)) if (m_VoiceGameMgr.ClientCommand(pPlayer, pcmd))
return TRUE; return TRUE;
#endif #endif

4
dlls/gearbox/ctf_gamerules.h

@ -5,7 +5,7 @@
#define BLUE 2 #define BLUE 2
#define RED 1 #define RED 1
#ifndef NO_VOICEGAMEMGR #if !NO_VOICEGAMEMGR
#include "voice_gamemgr.h" #include "voice_gamemgr.h"
#endif #endif
@ -117,7 +117,7 @@ public:
int iRedTeamScore; int iRedTeamScore;
float m_flFlagStatusTime; float m_flFlagStatusTime;
#ifndef NO_VOICEGAMEMGR #if !NO_VOICEGAMEMGR
CVoiceGameMgr m_VoiceGameMgr; CVoiceGameMgr m_VoiceGameMgr;
#endif #endif
private: private:

12
dlls/gearbox/displacer.cpp

@ -23,7 +23,7 @@
#include "shake.h" #include "shake.h"
#include "displacerball.h" #include "displacerball.h"
#ifndef CLIENT_DLL #if !CLIENT_DLL
extern edict_t *EntSelectSpawnPoint( CBaseEntity *pPlayer ); extern edict_t *EntSelectSpawnPoint( CBaseEntity *pPlayer );
@ -380,7 +380,7 @@ void CDisplacer::Precache(void)
PRECACHE_MODEL("sprites/lgtning.spr"); PRECACHE_MODEL("sprites/lgtning.spr");
#ifndef CLIENT_DLL #if !CLIENT_DLL
iPortalSprite = PRECACHE_MODEL("sprites/exit1.spr"); iPortalSprite = PRECACHE_MODEL("sprites/exit1.spr");
iRingSprite = PRECACHE_MODEL("sprites/disp_ring.spr"); iRingSprite = PRECACHE_MODEL("sprites/disp_ring.spr");
#endif #endif
@ -536,7 +536,7 @@ void CDisplacer::Displace( void )
m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
m_pPlayer->pev->punchangle.x -= 2; m_pPlayer->pev->punchangle.x -= 2;
#ifndef CLIENT_DLL #if !CLIENT_DLL
Vector vecSrc; Vector vecSrc;
UseAmmo(DISPLACER_PRIMARY_USAGE); UseAmmo(DISPLACER_PRIMARY_USAGE);
@ -561,7 +561,7 @@ void CDisplacer::Teleport( void )
const char *pszName; const char *pszName;
ClearBeams(); ClearBeams();
ClearSpin(); ClearSpin();
#ifndef CLIENT_DLL #if !CLIENT_DLL
CBaseEntity *pTarget = NULL; CBaseEntity *pTarget = NULL;
Vector tmp( 0, 0, 0 ); Vector tmp( 0, 0, 0 );
@ -630,7 +630,7 @@ void CDisplacer::Teleport( void )
void CDisplacer::LightningEffect( void ) void CDisplacer::LightningEffect( void )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
int m_iBeams = 0; int m_iBeams = 0;
if( g_pGameRules->IsMultiplayer()) if( g_pGameRules->IsMultiplayer())
@ -655,7 +655,7 @@ void CDisplacer::LightningEffect( void )
void CDisplacer::ClearBeams( void ) void CDisplacer::ClearBeams( void )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
if( g_pGameRules->IsMultiplayer()) if( g_pGameRules->IsMultiplayer())
return; return;

12
dlls/gearbox/eagle.cpp

@ -29,7 +29,7 @@ enum deagle_e {
}; };
LINK_ENTITY_TO_CLASS( weapon_eagle, CEagle ) LINK_ENTITY_TO_CLASS( weapon_eagle, CEagle )
#ifndef CLIENT_DLL #if !CLIENT_DLL
LINK_ENTITY_TO_CLASS( eagle_laser, CLaserSpot ) LINK_ENTITY_TO_CLASS( eagle_laser, CLaserSpot )
#endif #endif
@ -105,7 +105,7 @@ void CEagle::SecondaryAttack()
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5;
if (wasActive) if (wasActive)
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
if (m_pEagleLaser) if (m_pEagleLaser)
{ {
EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/desert_eagle_sight2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM); EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/desert_eagle_sight2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
@ -147,7 +147,7 @@ void CEagle::PrimaryAttack()
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 CEagle::PrimaryAttack()
{ {
vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, Vector( flSpread, flSpread, flSpread ), 8192, BULLET_PLAYER_EAGLE, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed ); vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, Vector( flSpread, flSpread, flSpread ), 8192, BULLET_PLAYER_EAGLE, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed );
m_flNextPrimaryAttack = UTIL_WeaponTimeBase()+ 0.5; m_flNextPrimaryAttack = UTIL_WeaponTimeBase()+ 0.5;
#ifndef CLIENT_DLL #if !CLIENT_DLL
m_pEagleLaser->Suspend( 0.6 ); m_pEagleLaser->Suspend( 0.6 );
#endif #endif
} }
@ -197,7 +197,7 @@ void CEagle::Reload( void )
if ( m_pEagleLaser && m_fEagleLaserActive ) if ( m_pEagleLaser && m_fEagleLaserActive )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
m_pEagleLaser->Suspend( 1.6 ); m_pEagleLaser->Suspend( 1.6 );
#endif #endif
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5;
@ -218,7 +218,7 @@ void CEagle::Reload( void )
void CEagle::UpdateSpot( void ) void CEagle::UpdateSpot( void )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
if (m_fEagleLaserActive) if (m_fEagleLaserActive)
{ {
if (m_pPlayer->pev->viewmodel == 0) if (m_pPlayer->pev->viewmodel == 0)

4
dlls/gearbox/gearbox_client.cpp

@ -1718,7 +1718,7 @@ void RegisterEncoders( void )
int GetWeaponData( struct edict_s *player, struct weapon_data_s *info ) int GetWeaponData( struct edict_s *player, struct weapon_data_s *info )
{ {
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
int i; int i;
weapon_data_t *item; weapon_data_t *item;
entvars_t *pev = &player->v; entvars_t *pev = &player->v;
@ -1865,7 +1865,7 @@ void UpdateClientData ( const edict_t *ent, int sendweapons, struct clientdata_s
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
if ( sendweapons ) if ( sendweapons )
{ {
if ( pl ) if ( pl )

4
dlls/gearbox/gearbox_utils.cpp

@ -152,7 +152,7 @@ UTIL_PrintActivity
*/ */
void UTIL_PrintActivity(struct entvars_s* pev, const ALERT_TYPE alert_type) void UTIL_PrintActivity(struct entvars_s* pev, const ALERT_TYPE alert_type)
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
ALERT(alert_type, "ALERT: entity %s with classname %s is using animation %s\n", ALERT(alert_type, "ALERT: entity %s with classname %s is using animation %s\n",
STRING(pev->targetname), STRING(pev->targetname),
STRING(pev->classname), STRING(pev->classname),
@ -178,4 +178,4 @@ UTIL_PrintActivity
void UTIL_PrintActivity(CBaseEntity* pEntity, const ALERT_TYPE alert_type) void UTIL_PrintActivity(CBaseEntity* pEntity, const ALERT_TYPE alert_type)
{ {
UTIL_PrintActivity(pEntity->edict(), alert_type); UTIL_PrintActivity(pEntity->edict(), alert_type);
} }

20
dlls/gearbox/grapple.cpp

@ -23,7 +23,7 @@
#include "effects.h" #include "effects.h"
#include "customentity.h" #include "customentity.h"
#ifndef CLIENT_DLL #if !CLIENT_DLL
#include "grapple_tonguetip.h" #include "grapple_tonguetip.h"
#endif #endif
@ -170,7 +170,7 @@ void CBarnacleGrapple::PrimaryAttack( void )
} }
UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle ); UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle );
#ifndef CLIENT_DLL #if !CLIENT_DLL
if( m_pTip ) if( m_pTip )
{ {
if( m_pTip->IsStuck() ) if( m_pTip->IsStuck() )
@ -298,7 +298,7 @@ void CBarnacleGrapple::PrimaryAttack( void )
m_pPlayer->m_iWeaponVolume = 450; m_pPlayer->m_iWeaponVolume = 450;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.1; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.1;
#ifndef CLIENT_DLL #if !CLIENT_DLL
if( g_pGameRules->IsMultiplayer() ) if( g_pGameRules->IsMultiplayer() )
{ {
m_flShootTime = gpGlobals->time; m_flShootTime = gpGlobals->time;
@ -318,7 +318,7 @@ void CBarnacleGrapple::PrimaryAttack( void )
return; return;
} }
#ifndef CLIENT_DLL #if !CLIENT_DLL
if( m_pTip->GetGrappleType() != GRAPPLE_FIXED && m_pTip->IsStuck() ) if( m_pTip->GetGrappleType() != GRAPPLE_FIXED && m_pTip->IsStuck() )
{ {
UTIL_MakeVectors( m_pPlayer->pev->v_angle ); UTIL_MakeVectors( m_pPlayer->pev->v_angle );
@ -363,7 +363,7 @@ void CBarnacleGrapple::PrimaryAttack( void )
if( m_pTip ) if( m_pTip )
{ {
bool bValidTarget = FALSE; bool bValidTarget = FALSE;
#ifndef CLIENT_DLL #if !CLIENT_DLL
if( pHit->IsPlayer() ) if( pHit->IsPlayer() )
{ {
m_pTip->SetGrappleTarget( pHit ); m_pTip->SetGrappleTarget( pHit );
@ -378,7 +378,7 @@ void CBarnacleGrapple::PrimaryAttack( void )
{ {
if( m_flDamageTime + 0.5 < gpGlobals->time ) if( m_flDamageTime + 0.5 < gpGlobals->time )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
ClearMultiDamage(); ClearMultiDamage();
float flDamage = gSkillData.plrDmgGrapple; float flDamage = gSkillData.plrDmgGrapple;
@ -428,7 +428,7 @@ void CBarnacleGrapple::PrimaryAttack( void )
void CBarnacleGrapple::Fire( Vector vecOrigin, Vector vecDir ) void CBarnacleGrapple::Fire( Vector vecOrigin, Vector vecDir )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
Vector vecSrc = vecOrigin; Vector vecSrc = vecOrigin;
Vector vecEnd = vecSrc + vecDir * 2048.0; Vector vecEnd = vecSrc + vecDir * 2048.0;
@ -481,7 +481,7 @@ void CBarnacleGrapple::EndAttack( void )
void CBarnacleGrapple::CreateEffect( void ) void CBarnacleGrapple::CreateEffect( void )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
DestroyEffect(); DestroyEffect();
m_pTip = GetClassPtr((CBarnacleGrappleTip *)NULL); m_pTip = GetClassPtr((CBarnacleGrappleTip *)NULL);
@ -520,7 +520,7 @@ void CBarnacleGrapple::CreateEffect( void )
void CBarnacleGrapple::UpdateEffect( void ) void CBarnacleGrapple::UpdateEffect( void )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
if( !m_pBeam || !m_pTip ) if( !m_pBeam || !m_pTip )
CreateEffect(); CreateEffect();
#endif #endif
@ -533,7 +533,7 @@ void CBarnacleGrapple::DestroyEffect( void )
UTIL_Remove( m_pBeam ); UTIL_Remove( m_pBeam );
m_pBeam = NULL; m_pBeam = NULL;
} }
#ifndef CLIENT_DLL #if !CLIENT_DLL
if( m_pTip ) if( m_pTip )
{ {
m_pTip->Killed( NULL, GIB_NEVER ); m_pTip->Killed( NULL, GIB_NEVER );

4
dlls/gearbox/grapple_tonguetip.h

@ -42,7 +42,7 @@ public:
bool IsStuck() const { return m_bIsStuck; } bool IsStuck() const { return m_bIsStuck; }
bool HasMissed() const { return m_bMissed; } bool HasMissed() const { return m_bMissed; }
#ifndef CLIENT_DLL #if !CLIENT_DLL
EHANDLE& GetGrappleTarget() { return m_hGrappleTarget; } EHANDLE& GetGrappleTarget() { return m_hGrappleTarget; }
void SetGrappleTarget( CBaseEntity* pTarget ) void SetGrappleTarget( CBaseEntity* pTarget )
{ {
@ -53,7 +53,7 @@ private:
int m_GrappleType; int m_GrappleType;
bool m_bIsStuck; bool m_bIsStuck;
bool m_bMissed; bool m_bMissed;
#ifndef CLIENT_DLL #if !CLIENT_DLL
EHANDLE m_hGrappleTarget; EHANDLE m_hGrappleTarget;
#endif #endif
Vector m_vecOriginOffset; Vector m_vecOriginOffset;

8
dlls/gearbox/knife.cpp

@ -105,7 +105,7 @@ void CKnife::PrimaryAttack()
{ {
if (!Swing(1)) if (!Swing(1))
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
SetThink(&CKnife::SwingAgain); SetThink(&CKnife::SwingAgain);
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1;
#endif #endif
@ -137,7 +137,7 @@ int CKnife::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);
@ -184,7 +184,7 @@ int CKnife::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;
@ -200,7 +200,7 @@ int CKnife::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() )

6
dlls/gearbox/m249.cpp

@ -155,7 +155,7 @@ void CM249::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())
@ -171,7 +171,7 @@ void CM249::PrimaryAttack()
} }
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
@ -180,7 +180,7 @@ void CM249::PrimaryAttack()
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usM249, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, pev->body, 0, 0); PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usM249, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, pev->body, 0, 0);
#ifndef CLIENT_DLL #if !CLIENT_DLL
// Add inverse impulse, but only if we are on the ground. // Add inverse impulse, but only if we are on the ground.
// This is mainly to avoid too-high air velocity. // This is mainly to avoid too-high air velocity.
if (m_pPlayer->pev->flags & FL_ONGROUND) if (m_pPlayer->pev->flags & FL_ONGROUND)

8
dlls/gearbox/penguin.cpp

@ -12,7 +12,7 @@
* without written permission from Valve LLC. * without written permission from Valve LLC.
* *
****/ ****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) #if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h" #include "extdll.h"
#include "util.h" #include "util.h"
@ -40,7 +40,7 @@ enum penguin_e {
PENGUIN_THROW PENGUIN_THROW
}; };
#ifndef CLIENT_DLL #if !CLIENT_DLL
class CPenguinGrenade : public CGrenade class CPenguinGrenade : public CGrenade
{ {
@ -493,7 +493,7 @@ void CPenguin::PrimaryAttack()
UTIL_TraceLine(trace_origin + gpGlobals->v_forward * 20, trace_origin + gpGlobals->v_forward * 64, dont_ignore_monsters, NULL, &tr); UTIL_TraceLine(trace_origin + gpGlobals->v_forward * 20, trace_origin + gpGlobals->v_forward * 64, dont_ignore_monsters, NULL, &tr);
int flags; int flags;
#ifdef CLIENT_WEAPONS #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
@ -506,7 +506,7 @@ void CPenguin::PrimaryAttack()
// player "shoot" animation // player "shoot" animation
m_pPlayer->SetAnimation(PLAYER_ATTACK1); m_pPlayer->SetAnimation(PLAYER_ATTACK1);
#ifndef CLIENT_DLL #if !CLIENT_DLL
CBaseEntity *pSqueak = CBaseEntity::Create("monster_penguin", tr.vecEndPos, m_pPlayer->pev->v_angle, m_pPlayer->edict()); CBaseEntity *pSqueak = CBaseEntity::Create("monster_penguin", tr.vecEndPos, m_pPlayer->pev->v_angle, m_pPlayer->edict());
pSqueak->pev->velocity = gpGlobals->v_forward * 200 + m_pPlayer->pev->velocity; pSqueak->pev->velocity = gpGlobals->v_forward * 200 + m_pPlayer->pev->velocity;
#endif #endif

12
dlls/gearbox/pipewrench.cpp

@ -118,7 +118,7 @@ void CPipeWrench::PrimaryAttack()
{ {
if (!m_iSwingMode && !Swing(1)) if (!m_iSwingMode && !Swing(1))
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
SetThink(&CPipeWrench::SwingAgain); SetThink(&CPipeWrench::SwingAgain);
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1;
#endif #endif
@ -160,7 +160,7 @@ int CPipeWrench::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 );
@ -211,7 +211,7 @@ int CPipeWrench::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;
@ -225,7 +225,7 @@ int CPipeWrench::Swing(int fFirst)
{ {
ClearMultiDamage(); ClearMultiDamage();
float flDamage; float flDamage;
#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() )
@ -321,7 +321,7 @@ void CPipeWrench::BigSwing(void)
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 );
@ -358,7 +358,7 @@ void CPipeWrench::BigSwing(void)
// player "shoot" animation // player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#ifndef CLIENT_DLL #if !CLIENT_DLL
// hit // hit
CBaseEntity *pEntity = CBaseEntity::Instance(tr.pHit); CBaseEntity *pEntity = CBaseEntity::Instance(tr.pHit);

22
dlls/gearbox/shockrifle.cpp

@ -12,7 +12,7 @@
* without written permission from Valve LLC. * without written permission from Valve LLC.
* *
****/ ****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) #if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h" #include "extdll.h"
#include "util.h" #include "util.h"
@ -22,7 +22,7 @@
#include "nodes.h" #include "nodes.h"
#include "player.h" #include "player.h"
#include "gamerules.h" #include "gamerules.h"
#ifndef CLIENT_DLL #if !CLIENT_DLL
#include "shock.h" #include "shock.h"
#endif #endif
@ -74,7 +74,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 hivehands come full. // in multiplayer, all hivehands come full.
@ -110,7 +110,7 @@ int CShockrifle::GetItemInfo(ItemInfo *p)
BOOL CShockrifle::Deploy() BOOL CShockrifle::Deploy()
{ {
#ifdef CLIENT_DLL #if CLIENT_DLL
if( bIsMultiplayer() ) if( bIsMultiplayer() )
#else #else
if( g_pGameRules->IsMultiplayer() ) if( g_pGameRules->IsMultiplayer() )
@ -141,7 +141,7 @@ void CShockrifle::PrimaryAttack()
if (m_pPlayer->pev->waterlevel == 3) if (m_pPlayer->pev->waterlevel == 3)
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
int attenuation = 150 * m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]; int attenuation = 150 * m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType];
int dmg = 100 * m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]; int dmg = 100 * m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType];
EMIT_SOUND(ENT(pev), CHAN_WEAPON, "weapons/shock_discharge.wav", VOL_NORM, ATTN_NORM); EMIT_SOUND(ENT(pev), CHAN_WEAPON, "weapons/shock_discharge.wav", VOL_NORM, ATTN_NORM);
@ -153,7 +153,7 @@ void CShockrifle::PrimaryAttack()
CreateChargeEffect(); CreateChargeEffect();
#ifndef CLIENT_DLL #if !CLIENT_DLL
Vector anglesAim = m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle; Vector anglesAim = m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle;
anglesAim.x = -anglesAim.x; anglesAim.x = -anglesAim.x;
UTIL_MakeVectors(m_pPlayer->pev->v_angle); UTIL_MakeVectors(m_pPlayer->pev->v_angle);
@ -172,7 +172,7 @@ void CShockrifle::PrimaryAttack()
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH; m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
@ -182,7 +182,7 @@ void CShockrifle::PrimaryAttack()
// player "shoot" animation // player "shoot" animation
m_pPlayer->SetAnimation(PLAYER_ATTACK1); m_pPlayer->SetAnimation(PLAYER_ATTACK1);
#ifdef CLIENT_DLL #if CLIENT_DLL
if( bIsMultiplayer() ) if( bIsMultiplayer() )
#else #else
if( g_pGameRules->IsMultiplayer() ) if( g_pGameRules->IsMultiplayer() )
@ -211,7 +211,7 @@ void CShockrifle::Reload(void)
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/shock_recharge.wav", 1, ATTN_NORM); EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/shock_recharge.wav", 1, ATTN_NORM);
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]++; m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]++;
#ifndef CLIENT_DLL #if !CLIENT_DLL
if( g_pGameRules->IsMultiplayer() ) if( g_pGameRules->IsMultiplayer() )
m_flRechargeTime += 0.25; m_flRechargeTime += 0.25;
else else
@ -239,7 +239,7 @@ void CShockrifle::WeaponIdle(void)
void CShockrifle::CreateChargeEffect( void ) void CShockrifle::CreateChargeEffect( void )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
if( g_pGameRules->IsMultiplayer()) if( g_pGameRules->IsMultiplayer())
return; return;
int iBeam = 0; int iBeam = 0;
@ -263,7 +263,7 @@ void CShockrifle::CreateChargeEffect( void )
void CShockrifle::ClearBeams( void ) void CShockrifle::ClearBeams( void )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
if( g_pGameRules->IsMultiplayer()) if( g_pGameRules->IsMultiplayer())
return; return;

4
dlls/gearbox/sniperrifle.cpp

@ -12,7 +12,7 @@
* without written permission from Valve LLC. * without written permission from Valve LLC.
* *
****/ ****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD ) #if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h" #include "extdll.h"
#include "util.h" #include "util.h"
@ -160,7 +160,7 @@ void CSniperrifle::PrimaryAttack()
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;

10
dlls/gearbox/sporelauncher.cpp

@ -21,7 +21,7 @@
#include "nodes.h" #include "nodes.h"
#include "player.h" #include "player.h"
#include "gamerules.h" #include "gamerules.h"
#ifndef CLIENT_DLL #if !CLIENT_DLL
#include "sporegrenade.h" #include "sporegrenade.h"
#endif #endif
@ -125,7 +125,7 @@ void CSporelauncher::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;
@ -137,7 +137,7 @@ void CSporelauncher::PrimaryAttack()
UTIL_MakeVectors( m_pPlayer->pev->v_angle ); UTIL_MakeVectors( m_pPlayer->pev->v_angle );
Vector vecSrc = m_pPlayer->GetGunPosition( ) + gpGlobals->v_forward * 16 + gpGlobals->v_right * 8 + gpGlobals->v_up * -8; Vector vecSrc = m_pPlayer->GetGunPosition( ) + gpGlobals->v_forward * 16 + gpGlobals->v_right * 8 + gpGlobals->v_up * -8;
#ifndef CLIENT_DLL #if !CLIENT_DLL
UTIL_MakeVectors( m_pPlayer->pev->v_angle ); UTIL_MakeVectors( m_pPlayer->pev->v_angle );
CSporeGrenade::ShootContact( m_pPlayer->pev, vecSrc, gpGlobals->v_forward * 1500 ); CSporeGrenade::ShootContact( m_pPlayer->pev, vecSrc, gpGlobals->v_forward * 1500 );
#endif #endif
@ -188,7 +188,7 @@ void CSporelauncher::SecondaryAttack(void)
int flags; int flags;
#if defined( CLIENT_WEAPONS ) #if CLIENT_WEAPONS
flags = FEV_NOTHOST; flags = FEV_NOTHOST;
#else #else
flags = 0; flags = 0;
@ -201,7 +201,7 @@ void CSporelauncher::SecondaryAttack(void)
UTIL_MakeVectors( m_pPlayer->pev->v_angle ); UTIL_MakeVectors( m_pPlayer->pev->v_angle );
Vector vecSrc = m_pPlayer->GetGunPosition( ) + gpGlobals->v_forward * 16 + gpGlobals->v_right * 8 + gpGlobals->v_up * -8; Vector vecSrc = m_pPlayer->GetGunPosition( ) + gpGlobals->v_forward * 16 + gpGlobals->v_right * 8 + gpGlobals->v_up * -8;
#ifndef CLIENT_DLL #if !CLIENT_DLL
UTIL_MakeVectors( m_pPlayer->pev->v_angle ); UTIL_MakeVectors( m_pPlayer->pev->v_angle );
CSporeGrenade::ShootTimed(m_pPlayer->pev, vecSrc, gpGlobals->v_forward * 1000, false); CSporeGrenade::ShootTimed(m_pPlayer->pev, vecSrc, gpGlobals->v_forward * 1000, false);
#endif #endif

34
dlls/weapons.h

@ -1063,7 +1063,7 @@ private:
class CDisplacer : public CBasePlayerWeapon class CDisplacer : 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[];
@ -1083,7 +1083,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;
@ -1110,7 +1110,7 @@ private:
class CEagle : public CBasePlayerWeapon class CEagle : 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[];
@ -1132,7 +1132,7 @@ public:
int m_fEagleLaserActive; int m_fEagleLaserActive;
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;
@ -1150,7 +1150,7 @@ class CBarnacleGrappleTip;
class CBarnacleGrapple : public CBasePlayerWeapon class CBarnacleGrapple : public CBasePlayerWeapon
{ {
public: public:
#ifndef CLIENT_DLL #if !CLIENT_DLL
virtual int Save( CSave &save ); virtual int Save( CSave &save );
virtual int Restore( CRestore &restore ); virtual int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[]; static TYPEDESCRIPTION m_SaveData[];
@ -1180,7 +1180,7 @@ public:
void DestroyEffect( void ); void DestroyEffect( void );
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;
@ -1220,7 +1220,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;
@ -1235,7 +1235,7 @@ class CM249 : 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[];
@ -1259,7 +1259,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;
@ -1289,7 +1289,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;
@ -1303,7 +1303,7 @@ private:
class CPipeWrench : public CBasePlayerWeapon class CPipeWrench : 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[];
@ -1331,7 +1331,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;
@ -1362,7 +1362,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;
@ -1378,7 +1378,7 @@ class CSniperrifle : 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[];
@ -1402,7 +1402,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;
@ -1417,7 +1417,7 @@ class CSporelauncher : public CShotgun
{ {
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[];
@ -1437,7 +1437,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;

Loading…
Cancel
Save