Browse Source

#ifdef->#if.

dmc
Andrey Akhmichin 3 years ago
parent
commit
57669b8f48
  1. 2
      cl_dll/hl/hl_weapons.cpp
  2. 2
      cl_dll/in_camera.cpp
  3. 8
      dlls/3wave/threewave_gamerules.cpp
  4. 2
      dlls/3wave/threewave_gamerules.h
  5. 12
      dlls/dmc/quake_gun.cpp
  6. 23
      dlls/dmc/quake_weapons_all.cpp
  7. 8
      dlls/doors.cpp
  8. 2
      pm_shared/pm_debug.c
  9. 2
      pm_shared/pm_shared.c

2
cl_dll/hl/hl_weapons.cpp

@ -1039,7 +1039,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
cl_dll/in_camera.cpp

@ -459,7 +459,7 @@ void CAM_OutUp( void )
void CAM_ToThirdPerson( void ) void CAM_ToThirdPerson( void )
{ {
vec3_t viewangles; vec3_t viewangles;
#if !defined( _DEBUG ) #if !_DEBUG
//if( gEngfuncs.GetMaxClients() > 1 ) //if( gEngfuncs.GetMaxClients() > 1 )
{ {
// no thirdperson in multiplayer. // no thirdperson in multiplayer.

8
dlls/3wave/threewave_gamerules.cpp

@ -56,7 +56,7 @@ extern unsigned short g_usCarried;
extern edict_t *EntSelectSpawnPoint( CBaseEntity *pPlayer, bool bCheckDM ); extern edict_t *EntSelectSpawnPoint( CBaseEntity *pPlayer, bool bCheckDM );
extern edict_t *RuneSelectSpawnPoint( void ); extern edict_t *RuneSelectSpawnPoint( void );
#ifndef NO_VOICEGAMEMGR #if !NO_VOICEGAMEMGR
class CThreeWaveGameMgrHelper : public IVoiceGameMgrHelper class CThreeWaveGameMgrHelper : public IVoiceGameMgrHelper
{ {
public: public:
@ -80,7 +80,7 @@ const char *GetTeamName( int team )
CThreeWave::CThreeWave() CThreeWave::CThreeWave()
{ {
#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
@ -130,7 +130,7 @@ extern cvar_t timeleft, fragsleft;
void CThreeWave::Think( void ) void CThreeWave::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 /////
@ -271,7 +271,7 @@ extern void DropRune( CBasePlayer *pPlayer );
//========================================================= //=========================================================
BOOL CThreeWave::ClientCommand( CBasePlayer *pPlayer, const char *pcmd ) BOOL CThreeWave::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

2
dlls/3wave/threewave_gamerules.h

@ -19,7 +19,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

12
dlls/dmc/quake_gun.cpp

@ -65,7 +65,7 @@ int CQuakeGun::GetItemInfo(ItemInfo *p)
void CQuakeGun::DestroyEffect( void ) void CQuakeGun::DestroyEffect( void )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
if ( m_pBeam ) if ( m_pBeam )
{ {
UTIL_Remove( m_pBeam ); UTIL_Remove( m_pBeam );
@ -76,7 +76,7 @@ void CQuakeGun::DestroyEffect( void )
void CQuakeGun::CreateEffect( void ) void CQuakeGun::CreateEffect( void )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
DestroyEffect(); DestroyEffect();
m_pBeam = CBeam::BeamCreate( "sprites/laserbeam.spr", 40 ); m_pBeam = CBeam::BeamCreate( "sprites/laserbeam.spr", 40 );
@ -94,7 +94,7 @@ void CQuakeGun::CreateEffect( void )
void CQuakeGun::UpdateEffect( void ) void CQuakeGun::UpdateEffect( void )
{ {
#if !defined( CLIENT_DLL ) #if !CLIENT_DLL
UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle ); UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle );
Vector vecAiming = gpGlobals->v_forward; Vector vecAiming = gpGlobals->v_forward;
Vector vecSrc = m_pPlayer->GetGunPosition( ); Vector vecSrc = m_pPlayer->GetGunPosition( );
@ -123,14 +123,14 @@ void CQuakeGun::UpdateEffect( void )
} }
#if !defined( CLIENT_DLL ) #if !CLIENT_DLL
BOOL CQuakeGun::Deploy( ) BOOL CQuakeGun::Deploy( )
{ {
m_pPlayer->pev->viewmodel = MAKE_STRING("models/v_crowbar.mdl"); m_pPlayer->pev->viewmodel = MAKE_STRING("models/v_crowbar.mdl");
m_pPlayer->pev->weaponmodel = MAKE_STRING("models/p_9mmhandgun.mdl"); m_pPlayer->pev->weaponmodel = MAKE_STRING("models/p_9mmhandgun.mdl");
m_pPlayer->m_pszAnimExtention = "onehanded"; m_pPlayer->m_pszAnimExtention = "onehanded";
#ifdef CLIENT_DLL #if CLIENT_DLL
g_flLightTime = 0.0; g_flLightTime = 0.0;
#endif #endif
@ -170,7 +170,7 @@ void CQuakeGun::PrimaryAttack( void )
iQuadSound = SuperDamageSound(); iQuadSound = SuperDamageSound();
m_pPlayer->W_Attack( iQuadSound ); m_pPlayer->W_Attack( iQuadSound );
#if !defined( CLIENT_DLL ) #if !CLIENT_DLL
if ( m_pPlayer->m_iQuakeWeapon == IT_LIGHTNING && m_pPlayer->pev->deadflag == DEAD_NO ) if ( m_pPlayer->m_iQuakeWeapon == IT_LIGHTNING && m_pPlayer->pev->deadflag == DEAD_NO )
UpdateEffect(); UpdateEffect();
#endif #endif

23
dlls/dmc/quake_weapons_all.cpp

@ -37,7 +37,7 @@ extern unsigned short g_usCarried;
extern bool g_bIsThreeWave; extern bool g_bIsThreeWave;
#ifdef CLIENT_DLL #if CLIENT_DLL
#include "cl_entity.h" #include "cl_entity.h"
struct cl_entity_s *GetViewEntity( void ); struct cl_entity_s *GetViewEntity( void );
extern float g_flLightTime; extern float g_flLightTime;
@ -229,13 +229,11 @@ void CBasePlayer::W_SetCurrentAmmo( int sendanim /* = 1 */ )
m_pCurrentAmmo = NULL; m_pCurrentAmmo = NULL;
} }
#if !defined( CLIENT_DLL ) #if !CLIENT_DLL
pev->viewmodel = iszViewModel; pev->viewmodel = iszViewModel;
pev->weaponmodel = iszWeaponModel; pev->weaponmodel = iszWeaponModel;
m_pszAnimExtention = szAnimExt; m_pszAnimExtention = szAnimExt;
#else #else
{ {
@ -414,7 +412,7 @@ void CBasePlayer::W_ChangeWeapon( int iWeaponNumber )
m_iQuakeWeapon = iWeapon; m_iQuakeWeapon = iWeapon;
W_SetCurrentAmmo(); W_SetCurrentAmmo();
#ifdef CLIENT_DLL #if CLIENT_DLL
g_flLightTime = 0.0; g_flLightTime = 0.0;
#endif #endif
} }
@ -632,7 +630,7 @@ void CBasePlayer::Q_FireBullets(int iShots, Vector vecDir, Vector vecSpread)
ApplyMultiDamage( pev, pev ); ApplyMultiDamage( pev, pev );
} }
#if !defined( CLIENT_DLL ) #if !CLIENT_DLL
// Quake Radius damage // Quake Radius damage
void Q_RadiusDamage( CBaseEntity *pInflictor, CBaseEntity *pAttacker, float flDamage, CBaseEntity *pIgnore ) void Q_RadiusDamage( CBaseEntity *pInflictor, CBaseEntity *pAttacker, float flDamage, CBaseEntity *pIgnore )
{ {
@ -667,7 +665,7 @@ void Q_RadiusDamage( CBaseEntity *pInflictor, CBaseEntity *pAttacker, float flDa
void LightningHit(CBaseEntity *pTarget, CBaseEntity *pAttacker, Vector vecHitPos, float flDamage, TraceResult *ptr, Vector vecDir ) void LightningHit(CBaseEntity *pTarget, CBaseEntity *pAttacker, Vector vecHitPos, float flDamage, TraceResult *ptr, Vector vecDir )
{ {
#ifndef CLIENT_DLL #if !CLIENT_DLL
SpawnBlood( vecHitPos, BLOOD_COLOR_RED, flDamage * 1.5f ); SpawnBlood( vecHitPos, BLOOD_COLOR_RED, flDamage * 1.5f );
if ( g_pGameRules->PlayerRelationship( pTarget, pAttacker ) != GR_TEAMMATE ) if ( g_pGameRules->PlayerRelationship( pTarget, pAttacker ) != GR_TEAMMATE )
@ -683,7 +681,7 @@ void LightningHit(CBaseEntity *pTarget, CBaseEntity *pAttacker, Vector vecHitPos
// Lightning Damage // Lightning Damage
void CBasePlayer::LightningDamage( Vector p1, Vector p2, CBaseEntity *pAttacker, float flDamage, Vector vecDir) void CBasePlayer::LightningDamage( Vector p1, Vector p2, CBaseEntity *pAttacker, float flDamage, Vector vecDir)
{ {
#if !defined( CLIENT_DLL ) #if !CLIENT_DLL
TraceResult trace; TraceResult trace;
Vector vecThru = (p2 - p1).Normalize(); Vector vecThru = (p2 - p1).Normalize();
vecThru.x = 0 - vecThru.y; vecThru.x = 0 - vecThru.y;
@ -749,7 +747,7 @@ void CBasePlayer::W_FireAxe()
pEntity->TakeDamage( pev, pev, iDmg, DMG_GENERIC ); pEntity->TakeDamage( pev, pev, iDmg, DMG_GENERIC );
#ifndef CLIENT_DLL #if !CLIENT_DLL
if ( g_pGameRules->PlayerRelationship( this, pEntity ) != GR_TEAMMATE ) if ( g_pGameRules->PlayerRelationship( this, pEntity ) != GR_TEAMMATE )
SpawnBlood( vecOrg, BLOOD_COLOR_RED, iDmg * 4 ); // Make a lot of Blood! SpawnBlood( vecOrg, BLOOD_COLOR_RED, iDmg * 4 ); // Make a lot of Blood!
#endif #endif
@ -775,7 +773,7 @@ void CBasePlayer::W_FireHook( void )
Throw_Grapple(); Throw_Grapple();
} }
#ifdef CLIENT_DLL #if CLIENT_DLL
unsigned short g_usCable; unsigned short g_usCable;
unsigned short g_usHook; unsigned short g_usHook;
unsigned short g_usCarried; unsigned short g_usCarried;
@ -884,7 +882,7 @@ void CBasePlayer::W_FireLightning( int iQuadSound )
float flCellsBurnt = *m_pCurrentAmmo; float flCellsBurnt = *m_pCurrentAmmo;
*m_pCurrentAmmo = 0; *m_pCurrentAmmo = 0;
W_SetCurrentAmmo(); W_SetCurrentAmmo();
#if !defined( CLIENT_DLL ) #if !CLIENT_DLL
Q_RadiusDamage( this, this, 35 * flCellsBurnt, NULL ); Q_RadiusDamage( this, this, 35 * flCellsBurnt, NULL );
#endif #endif
return; return;
@ -893,8 +891,7 @@ void CBasePlayer::W_FireLightning( int iQuadSound )
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, pev->origin, pev->angles, 0.0, 0.0, iQuadSound, 0, playsound, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, pev->origin, pev->angles, 0.0, 0.0, iQuadSound, 0, playsound, 0 );
#if !defined( CLIENT_DLL ) #if !CLIENT_DLL
if (gpGlobals->deathmatch != 4 ) if (gpGlobals->deathmatch != 4 )
*m_pCurrentAmmo -= 1; *m_pCurrentAmmo -= 1;

8
dlls/doors.cpp

@ -628,7 +628,7 @@ void CBaseDoor::DoorGoUp( void )
Vector vecCenter( Center() ); Vector vecCenter( Center() );
PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorGoUp, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorGoUp, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 );
#if defined ( OLD_SOUNDS ) #if OLD_SOUNDS
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) );
if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN ) if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN )
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ), 1, ATTN_NORM );
@ -681,7 +681,7 @@ void CBaseDoor::DoorHitTop( void )
PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorHitTop, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorHitTop, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 );
#if defined ( OLD_SOUNDS ) #if OLD_SOUNDS
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) );
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseArrived ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseArrived ), 1, ATTN_NORM );
#endif #endif
@ -731,7 +731,7 @@ void CBaseDoor::DoorGoDown( void )
Vector vecCenter( Center() ); Vector vecCenter( Center() );
PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorGoDown, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorGoDown, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 );
#if defined ( OLD_SOUNDS ) #if OLD_SOUNDS
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) );
if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN ) if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN )
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ), 1, ATTN_NORM );
@ -763,7 +763,7 @@ void CBaseDoor::DoorHitBottom( void )
Vector vecCenter( Center() ); Vector vecCenter( Center() );
PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorHitBottom, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorHitBottom, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 );
#if defined ( OLD_SOUNDS ) #if OLD_SOUNDS
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) );
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseArrived ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseArrived ), 1, ATTN_NORM );
#endif #endif

2
pm_shared/pm_debug.c

@ -49,7 +49,7 @@ static int PM_boxpnt[6][4] =
void PM_ShowClipBox( void ) void PM_ShowClipBox( void )
{ {
#if defined( _DEBUG ) #if _DEBUG
vec3_t org; vec3_t org;
vec3_t offset = { 0, 0, 0 }; vec3_t offset = { 0, 0, 0 };

2
pm_shared/pm_shared.c

@ -2730,7 +2730,7 @@ void PM_Move( struct playermove_s *ppmove, int server )
pmove->friction = 1.0f; pmove->friction = 1.0f;
} }
#ifdef CLIENT_DLL #if CLIENT_DLL
g_onground = ( pmove->onground != -1 ); g_onground = ( pmove->onground != -1 );
g_inwater = ( pmove->waterlevel > 1 ); g_inwater = ( pmove->waterlevel > 1 );
g_walking = ( pmove->movetype == MOVETYPE_WALK ); g_walking = ( pmove->movetype == MOVETYPE_WALK );

Loading…
Cancel
Save