diff --git a/game/client/c_baseanimating.cpp b/game/client/c_baseanimating.cpp index d66339e5..a7eb7e6a 100644 --- a/game/client/c_baseanimating.cpp +++ b/game/client/c_baseanimating.cpp @@ -55,7 +55,7 @@ #include "studio_stats.h" #include "tier1/callqueue.h" -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT #include "c_tf_player.h" #include "c_baseobject.h" #endif @@ -1285,7 +1285,7 @@ void C_BaseAnimating::DelayedInitModelEffects( void ) return; } } - #ifdef TF_CLIENT_DLL + #ifdef TF_CLIENT_DLL || TF_MOD_CLIENT // Halloween Hack for Sentry Rockets if ( !V_strcmp( "sentry_rocket", pszParticleEffect ) ) { @@ -3065,7 +3065,7 @@ int C_BaseAnimating::DrawModel( int flags ) int drawn = 0; -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT ValidateModelIndex(); #endif diff --git a/game/client/c_baseflex.cpp b/game/client/c_baseflex.cpp index b1816840..45aad5d2 100644 --- a/game/client/c_baseflex.cpp +++ b/game/client/c_baseflex.cpp @@ -351,7 +351,7 @@ bool CFlexSceneFileManager::Init() FindSceneFile( NULL, "randomAlert", true ); #endif -#if defined( TF_CLIENT_DLL ) +#if defined( TF_CLIENT_DLL ) || defined( TF_MOD_CLIENT ) // HACK TO ALL TF TO HAVE PER CLASS OVERRIDES char const *pTFClasses[] = { @@ -433,7 +433,7 @@ void *CFlexSceneFileManager::FindSceneFile( IHasLocalToGlobalFlexSettings *insta Assert( V_strlen( filename ) < MAX_PATH ); V_strcpy( szFilename, filename ); -#if defined( TF_CLIENT_DLL ) +#if defined( TF_CLIENT_DLL ) || defined( TF_MOD_CLIENT ) char szHWMFilename[MAX_PATH]; if ( GetHWMExpressionFileName( szFilename, szHWMFilename ) ) { diff --git a/game/client/c_baseviewmodel.cpp b/game/client/c_baseviewmodel.cpp index 98132bc9..5dd0591d 100644 --- a/game/client/c_baseviewmodel.cpp +++ b/game/client/c_baseviewmodel.cpp @@ -36,7 +36,7 @@ ConVar cl_righthand( "cl_righthand", "1", FCVAR_ARCHIVE, "Use right-handed view models." ); #endif -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT ConVar cl_flipviewmodels( "cl_flipviewmodels", "0", FCVAR_USERINFO | FCVAR_ARCHIVE | FCVAR_NOT_CONNECTED, "Flip view models." ); #endif @@ -204,7 +204,7 @@ inline bool C_BaseViewModel::ShouldFlipViewModel() } #endif -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT CBaseCombatWeapon *pWeapon = m_hWeapon.Get(); if ( pWeapon ) { diff --git a/game/client/c_fire_smoke.cpp b/game/client/c_fire_smoke.cpp index 42e6f3ed..66740d34 100644 --- a/game/client/c_fire_smoke.cpp +++ b/game/client/c_fire_smoke.cpp @@ -332,7 +332,7 @@ void C_EntityFlame::CreateEffect( void ) m_hEffect = NULL; } -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT m_hEffect = ParticleProp()->Create( "burningplayer_red", PATTACH_ABSORIGIN_FOLLOW ); #else m_hEffect = ParticleProp()->Create( "burning_character", PATTACH_ABSORIGIN_FOLLOW ); diff --git a/game/client/c_impact_effects.cpp b/game/client/c_impact_effects.cpp index 5b350c18..88a94d33 100644 --- a/game/client/c_impact_effects.cpp +++ b/game/client/c_impact_effects.cpp @@ -73,7 +73,7 @@ void FX_CacheMaterialHandles( void ) g_Mat_BloodPuff[0] = ParticleMgr()->GetPMaterial( "effects/blood" ); g_Mat_BloodPuff[1] = ParticleMgr()->GetPMaterial( "effects/blood2" ); -#ifndef TF_CLIENT_DLL +#ifndef TF_CLIENT_DLL && TF_MOD_CLIENT g_Mat_SMG_Muzzleflash[0] = ParticleMgr()->GetPMaterial( "effects/muzzleflash1" ); g_Mat_SMG_Muzzleflash[1] = ParticleMgr()->GetPMaterial( "effects/muzzleflash2" ); g_Mat_SMG_Muzzleflash[2] = ParticleMgr()->GetPMaterial( "effects/muzzleflash3" ); diff --git a/game/client/c_sceneentity.cpp b/game/client/c_sceneentity.cpp index b44b59fd..38eadca7 100644 --- a/game/client/c_sceneentity.cpp +++ b/game/client/c_sceneentity.cpp @@ -70,7 +70,7 @@ C_SceneEntity::~C_SceneEntity( void ) void C_SceneEntity::OnResetClientTime() { // In TF2 we ignore this as the scene is played entirely client-side. -#ifndef TF_CLIENT_DLL +#ifndef TF_CLIENT_DLL && TF_MOD_CLIENT m_flCurrentTime = m_flForceClientTime; #endif } @@ -1208,4 +1208,4 @@ void C_SceneEntity::PrefetchAnimBlocks( CChoreoScene *pScene ) return; Msg( "%d of %d animations resident\n", nResident, nChecked ); -} \ No newline at end of file +} diff --git a/game/client/c_te_legacytempents.cpp b/game/client/c_te_legacytempents.cpp index 831715a8..1dc033eb 100644 --- a/game/client/c_te_legacytempents.cpp +++ b/game/client/c_te_legacytempents.cpp @@ -44,7 +44,7 @@ extern ConVar muzzleflash_light; #define TENT_WIND_ACCEL 50 //Precache the effects -#ifndef TF_CLIENT_DLL +#ifndef TF_CLIENT_DLL && TF_MOD_CLIENT CLIENTEFFECT_REGISTER_BEGIN( PrecacheEffectMuzzleFlash ) CLIENTEFFECT_MATERIAL( "effects/muzzleflash1" ) @@ -2389,7 +2389,7 @@ void CTempEnts::Update(void) // Recache tempents which might have been flushed void CTempEnts::LevelInit() { -#ifndef TF_CLIENT_DLL +#ifndef TF_CLIENT_DLL && TF_MOD_CLIENT m_pSpriteMuzzleFlash[0] = (model_t *)engine->LoadModel( "sprites/ar2_muzzle1.vmt" ); m_pSpriteMuzzleFlash[1] = (model_t *)engine->LoadModel( "sprites/muzzleflash4.vmt" ); m_pSpriteMuzzleFlash[2] = (model_t *)engine->LoadModel( "sprites/muzzleflash4.vmt" ); diff --git a/game/client/cdll_client_int.cpp b/game/client/cdll_client_int.cpp index e36a745f..7f4d16e4 100644 --- a/game/client/cdll_client_int.cpp +++ b/game/client/cdll_client_int.cpp @@ -1013,12 +1013,12 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi IGameSystem::Add( PerfVisualBenchmark() ); IGameSystem::Add( MumbleSystem() ); - #if defined( TF_CLIENT_DLL ) + #if defined( TF_CLIENT_DLL )// || defined( TF_MOD_CLIENT ) IGameSystem::Add( CustomTextureToolCacheGameSystem() ); IGameSystem::Add( TFSharedContentManager() ); #endif -#if defined( TF_CLIENT_DLL ) +#if defined( TF_CLIENT_DLL )// || defined( TF_MOD_CLIENT ) if ( g_AbuseReportMgr != NULL ) { IGameSystem::Add( g_AbuseReportMgr ); @@ -1263,7 +1263,7 @@ void CHLClient::HudUpdate( bool bActive ) { float frametime = gpGlobals->frametime; -#if defined( TF_CLIENT_DLL ) +#if defined( TF_CLIENT_DLL )// || defined( TF_MOD_CLIENT ) CRTime::UpdateRealTime(); #endif @@ -1665,7 +1665,7 @@ void CHLClient::ResetStringTablePointers() g_pStringTableClientSideChoreoScenes = NULL; g_pStringTableServerMapCycle = NULL; -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT g_pStringTableServerPopFiles = NULL; g_pStringTableServerMapCycleMvM = NULL; #endif @@ -1722,7 +1722,7 @@ void CHLClient::LevelShutdown( void ) messagechars->Clear(); -#ifndef TF_CLIENT_DLL +#ifndef TF_CLIENT_DLL || TF_MOD_CLIENT // don't want to do this for TF2 because we have particle systems in our // character loadout screen that can be viewed when we're not connected to a server g_pParticleSystemMgr->UncacheAllParticleSystems(); @@ -1895,7 +1895,7 @@ void CHLClient::InstallStringTableCallback( const char *tableName ) { g_pStringTableServerMapCycle = networkstringtable->FindTable( tableName ); } -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT else if ( !Q_strcasecmp( tableName, "ServerPopFiles" ) ) { g_pStringTableServerPopFiles = networkstringtable->FindTable( tableName ); @@ -2552,7 +2552,7 @@ void CHLClient::FileReceived( const char * fileName, unsigned int transferID ) void CHLClient::ClientAdjustStartSoundParams( StartSoundParams_t& params ) { -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT CBaseEntity *pEntity = ClientEntityList().GetEnt( params.soundsource ); // A player speaking @@ -2604,7 +2604,7 @@ bool CHLClient::DisconnectAttempt( void ) { bool bRet = false; -#if defined( TF_CLIENT_DLL ) +#if defined( TF_CLIENT_DLL )// || defined( TF_MOD_CLIENT ) bRet = HandleDisconnectAttempt(); #endif diff --git a/game/client/cdll_util.cpp b/game/client/cdll_util.cpp index 4e877530..28bcb6c0 100644 --- a/game/client/cdll_util.cpp +++ b/game/client/cdll_util.cpp @@ -1206,7 +1206,7 @@ bool UTIL_GetMapLoadCountFileName( const char *pszFilePrependName, char *pszBuff return true; } -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT #define MAP_KEY_FILE "viewed.res" #else #define MAP_KEY_FILE "mapkeys.res" diff --git a/game/client/fx.cpp b/game/client/fx.cpp index 3615aa0d..0259b92e 100644 --- a/game/client/fx.cpp +++ b/game/client/fx.cpp @@ -30,7 +30,7 @@ #include "tier0/memdbgon.h" //Precahce the effects -#ifndef TF_CLIENT_DLL +#ifndef TF_CLIENT_DLL && TF_MOD_CLIENT CLIENTEFFECT_REGISTER_BEGIN( PrecacheMuzzleFlash ) CLIENTEFFECT_MATERIAL( "effects/muzzleflash1" ) CLIENTEFFECT_MATERIAL( "effects/muzzleflash2" ) diff --git a/game/client/fx_tracer.cpp b/game/client/fx_tracer.cpp index f0ca0e13..b2373fe7 100644 --- a/game/client/fx_tracer.cpp +++ b/game/client/fx_tracer.cpp @@ -38,7 +38,7 @@ Vector GetTracerOrigin( const CEffectData &data ) C_BaseEntity *pEnt = data.GetEntity(); // This check should probably be for all multiplayer games, investigate later -#if defined( HL2MP ) || defined( TF_CLIENT_DLL ) +#if defined( HL2MP ) || defined( TF_CLIENT_DLL ) || defined( TF_MOD_CLIENT ) if ( pEnt && pEnt->IsDormant() ) return vecStart; #endif diff --git a/game/client/game_controls/basemodelpanel.cpp b/game/client/game_controls/basemodelpanel.cpp index 20588734..f8fa60e0 100644 --- a/game/client/game_controls/basemodelpanel.cpp +++ b/game/client/game_controls/basemodelpanel.cpp @@ -569,7 +569,12 @@ void CModelPanel::Paint() } Vector vecExtraModelOffset( 0, 0, 0 ); - float flWidthRatio = ((float)w / (float)h ) / ( 4.0f / 3.0f ); + +#ifdef TF_MOD_CLIENT + float flWidthRatio = engine->GetScreenAspectRatio() / ( 4.0f / 3.0f ); +#else + float flWidthRatio = ((float)w / (float)h ) / ( 4.0f / 3.0f ); +#endif // is this a player model? if ( Q_strstr( GetModelName(), "models/player/" ) ) diff --git a/game/client/game_controls/baseviewport.cpp b/game/client/game_controls/baseviewport.cpp index 181b0d33..d96f2d6c 100644 --- a/game/client/game_controls/baseviewport.cpp +++ b/game/client/game_controls/baseviewport.cpp @@ -239,7 +239,7 @@ void CBaseViewport::CreateDefaultPanels( void ) AddNewPanel( CreatePanelByName( PANEL_SCOREBOARD ), "PANEL_SCOREBOARD" ); AddNewPanel( CreatePanelByName( PANEL_INFO ), "PANEL_INFO" ); AddNewPanel( CreatePanelByName( PANEL_SPECGUI ), "PANEL_SPECGUI" ); -#if !defined( TF_CLIENT_DLL ) +#if !defined( TF_CLIENT_DLL ) && !defined( TF_MOD_CLIENT ) AddNewPanel( CreatePanelByName( PANEL_SPECMENU ), "PANEL_SPECMENU" ); AddNewPanel( CreatePanelByName( PANEL_NAV_PROGRESS ), "PANEL_NAV_PROGRESS" ); #endif // !TF_CLIENT_DLL diff --git a/game/client/game_controls/classmenu.cpp b/game/client/game_controls/classmenu.cpp index d9e857ce..1643c000 100644 --- a/game/client/game_controls/classmenu.cpp +++ b/game/client/game_controls/classmenu.cpp @@ -39,7 +39,7 @@ extern IGameUIFuncs *gameuifuncs; // for key binding details using namespace vgui; -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT #define HUD_CLASSAUTOKILL_FLAGS ( FCVAR_CLIENTDLL | FCVAR_ARCHIVE | FCVAR_USERINFO ) #else #define HUD_CLASSAUTOKILL_FLAGS ( FCVAR_CLIENTDLL | FCVAR_ARCHIVE ) diff --git a/game/client/history_resource.cpp b/game/client/history_resource.cpp index c0743b41..69685c07 100644 --- a/game/client/history_resource.cpp +++ b/game/client/history_resource.cpp @@ -280,7 +280,7 @@ void CHudHistoryResource::CheckClearHistory( void ) //----------------------------------------------------------------------------- bool CHudHistoryResource::ShouldDraw( void ) { -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT return false; #else return ( ( m_iCurrentHistorySlot > 0 || m_bNeedsDraw ) && CHudElement::ShouldDraw() ); diff --git a/game/client/hud.cpp b/game/client/hud.cpp index d0e78390..66b998c6 100644 --- a/game/client/hud.cpp +++ b/game/client/hud.cpp @@ -240,7 +240,7 @@ CHudElement::CHudElement( const char *pElementName ) m_bIsParentedToClientDLLRootPanel = false; // Make this for all hud elements, but when its a bit safer -#if defined( TF_CLIENT_DLL ) || defined( DOD_DLL ) +#if defined( TF_CLIENT_DLL ) || defined( DOD_DLL ) || defined( TF_MOD_CLIENT ) RegisterForRenderGroup( "global" ); #endif } @@ -975,7 +975,7 @@ bool CHud::IsHidden( int iHudFlags ) return true; // Hide all HUD elements during screenshot if the user's set hud_freezecamhide ( TF2 ) -#if defined( TF_CLIENT_DLL ) +#if defined( TF_CLIENT_DLL ) || defined( TF_MOD_CLIENT ) extern bool IsTakingAFreezecamScreenshot(); extern ConVar hud_freezecamhide; diff --git a/game/client/hud_vote.cpp b/game/client/hud_vote.cpp index 659669a0..8a35b71b 100644 --- a/game/client/hud_vote.cpp +++ b/game/client/hud_vote.cpp @@ -1452,7 +1452,7 @@ void CHudVote::MsgFunc_VoteSetup( bf_read &msg ) bool bMvM = false; INetworkStringTable *pStringTable = g_pStringTableServerMapCycle; -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() ) { bMvM = true; @@ -1483,7 +1483,7 @@ void CHudVote::MsgFunc_VoteSetup( bf_read &msg ) } } -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT m_VoteSetupPopFiles.RemoveAll(); if ( g_pStringTableServerPopFiles ) { diff --git a/game/client/in_camera.cpp b/game/client/in_camera.cpp index aa010732..2399c919 100644 --- a/game/client/in_camera.cpp +++ b/game/client/in_camera.cpp @@ -907,7 +907,7 @@ static ConCommand camout( "-camout", CAM_OutUp ); static ConCommand thirdperson_mayamode( "thirdperson_mayamode", ::CAM_ToThirdPerson_MayaMode, "Switch to thirdperson Maya-like camera controls.", FCVAR_CHEAT ); // TF allows servers to push people into first/thirdperson, for mods -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT static ConCommand thirdperson( "thirdperson", ::CAM_ToThirdPerson, "Switch to thirdperson camera.", FCVAR_CHEAT | FCVAR_SERVER_CAN_EXECUTE ); static ConCommand firstperson( "firstperson", ::CAM_ToFirstPerson, "Switch to firstperson camera.", FCVAR_SERVER_CAN_EXECUTE ); #else @@ -929,4 +929,4 @@ Init_Camera void CInput::Init_Camera( void ) { m_CameraIsOrthographic = false; -} \ No newline at end of file +} diff --git a/game/client/in_main.cpp b/game/client/in_main.cpp index 52759078..1e5c0cb1 100644 --- a/game/client/in_main.cpp +++ b/game/client/in_main.cpp @@ -1630,9 +1630,10 @@ static ConCommand startgrenade2( "+grenade2", IN_Grenade2Down ); static ConCommand startattack3("+attack3", IN_Attack3Down); static ConCommand endattack3("-attack3", IN_Attack3Up); -#ifdef TF_CLIENT_DLL +// XXX: (SanyaSho): why? +//#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT static ConCommand toggle_duck( "toggle_duck", IN_DuckToggle ); -#endif +//#endif // Xbox 360 stub commands static ConCommand xboxmove("xmove", IN_XboxStub); diff --git a/game/client/networkstringtable_clientdll.h b/game/client/networkstringtable_clientdll.h index 006817c8..e4a5b4c8 100644 --- a/game/client/networkstringtable_clientdll.h +++ b/game/client/networkstringtable_clientdll.h @@ -24,7 +24,7 @@ extern INetworkStringTable *g_pStringTableInfoPanel; extern INetworkStringTable *g_pStringTableClientSideChoreoScenes; extern INetworkStringTable *g_pStringTableServerMapCycle; -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT extern INetworkStringTable *g_pStringTableServerPopFiles; extern INetworkStringTable *g_pStringTableServerMapCycleMvM; #endif diff --git a/game/client/particlemgr.cpp b/game/client/particlemgr.cpp index 8d14e7b6..191296a5 100644 --- a/game/client/particlemgr.cpp +++ b/game/client/particlemgr.cpp @@ -26,7 +26,7 @@ #include "filesystem.h" #include "particle_parse.h" #include "model_types.h" -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT #include "rtime.h" #endif #include "tier0/icommandline.h" @@ -1083,7 +1083,7 @@ bool CParticleMgr::Init(unsigned long count, IMaterialSystem *pMaterials) // Send true to load the sheets ParseParticleEffects( true, false ); -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT if ( IsX360() ) { //m_pThreadPool[0] = CreateThreadPool(); diff --git a/game/client/physpropclientside.cpp b/game/client/physpropclientside.cpp index 3dd2d7b5..5cdf8b07 100644 --- a/game/client/physpropclientside.cpp +++ b/game/client/physpropclientside.cpp @@ -749,7 +749,7 @@ CBaseEntity *BreakModelCreateSingle( CBaseEntity *pOwner, breakmodel_t *pModel, pEntity->m_nSkin = nSkin; pEntity->m_iHealth = pModel->health; -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT pEntity->SetCollisionGroup( COLLISION_GROUP_DEBRIS ); #endif @@ -1028,4 +1028,4 @@ void C_FuncPhysicsRespawnZone::ClientThink( void ) RespawnProps(); SetNextClientThink( gpGlobals->curtime + (cl_phys_props_respawnrate.GetFloat() * RandomFloat(1.0,1.1)) ); -} \ No newline at end of file +} diff --git a/game/client/vgui_centerstringpanel.cpp b/game/client/vgui_centerstringpanel.cpp index a4171e73..3503ea79 100644 --- a/game/client/vgui_centerstringpanel.cpp +++ b/game/client/vgui_centerstringpanel.cpp @@ -21,7 +21,7 @@ #include "tier0/memdbgon.h" -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT static ConVar scr_centertime( "scr_centertime", "5" ); #else static ConVar scr_centertime( "scr_centertime", "2" ); @@ -307,4 +307,4 @@ void CCenterPrint::Destroy( void ) static CCenterPrint g_CenterString; CCenterPrint *internalCenterPrint = &g_CenterString; -EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CCenterPrint, ICenterPrint, VCENTERPRINT_INTERFACE_VERSION, g_CenterString ); \ No newline at end of file +EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CCenterPrint, ICenterPrint, VCENTERPRINT_INTERFACE_VERSION, g_CenterString ); diff --git a/game/client/view.cpp b/game/client/view.cpp index 3aa035b2..4f924187 100644 --- a/game/client/view.cpp +++ b/game/client/view.cpp @@ -107,7 +107,7 @@ extern ConVar cl_forwardspeed; static ConVar v_centermove( "v_centermove", "0.15"); static ConVar v_centerspeed( "v_centerspeed","500" ); -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT // 54 degrees approximates a 35mm camera - we determined that this makes the viewmodels // and motions look the most natural. ConVar v_viewmodel_fov( "viewmodel_fov", "54", FCVAR_ARCHIVE ); diff --git a/game/client/viewrender.cpp b/game/client/viewrender.cpp index f6193ef4..ce2bec41 100644 --- a/game/client/viewrender.cpp +++ b/game/client/viewrender.cpp @@ -110,7 +110,7 @@ static ConVar r_drawopaqueworld( "r_drawopaqueworld", "1", FCVAR_CHEAT ); static ConVar r_drawtranslucentworld( "r_drawtranslucentworld", "1", FCVAR_CHEAT ); static ConVar r_3dsky( "r_3dsky","1", 0, "Enable the rendering of 3d sky boxes" ); static ConVar r_skybox( "r_skybox","1", FCVAR_CHEAT, "Enable the rendering of sky boxes" ); -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT ConVar r_drawviewmodel( "r_drawviewmodel","1", FCVAR_ARCHIVE ); #else ConVar r_drawviewmodel( "r_drawviewmodel","1", FCVAR_CHEAT ); diff --git a/game/client/weapon_selection.cpp b/game/client/weapon_selection.cpp index 66666b59..d5995c17 100644 --- a/game/client/weapon_selection.cpp +++ b/game/client/weapon_selection.cpp @@ -177,7 +177,7 @@ void CBaseHudWeaponSelection::ProcessInput() { if ( IsWeaponSelectable() ) { -#ifndef TF_CLIENT_DLL +#ifndef TF_CLIENT_DLL && TF_MOD_CLIENT if ( HUDTYPE_PLUS != hud_fastswitch.GetInt() ) #endif { diff --git a/game/server/AI_ResponseSystem.cpp b/game/server/AI_ResponseSystem.cpp index 7b739679..264d3d0d 100644 --- a/game/server/AI_ResponseSystem.cpp +++ b/game/server/AI_ResponseSystem.cpp @@ -3039,7 +3039,7 @@ CON_COMMAND( rr_reloadresponsesystems, "Reload all response system scripts." ) defaultresponsesytem.ReloadAllResponseSystems(); -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) // This is kind of hacky, but I need to get it in for now! if( g_pGameRules->IsMultiplayer() ) { diff --git a/game/server/ai_speech.cpp b/game/server/ai_speech.cpp index d98fe7b8..d20c9cbf 100644 --- a/game/server/ai_speech.cpp +++ b/game/server/ai_speech.cpp @@ -579,7 +579,7 @@ bool CAI_Expresser::SpeakRawScene( const char *pszScene, float delay, AI_Respons { SpeechMsg( GetOuter(), "SpeakRawScene( %s, %f) %f\n", pszScene, delay, sceneLength ); -#if defined( HL2_EPISODIC ) || defined( TF_DLL ) +#if defined( HL2_EPISODIC ) || defined( TF_DLL ) || defined( TF_MOD ) char szInstanceFilename[256]; GetOuter()->GenderExpandString( pszScene, szInstanceFilename, sizeof( szInstanceFilename ) ); // Only mark ourselves as speaking if the scene has speech @@ -1042,4 +1042,4 @@ void CMultiplayer_Expresser::AllowMultipleScenes() void CMultiplayer_Expresser::DisallowMultipleScenes() { m_bAllowMultipleScenes = false; -} \ No newline at end of file +} diff --git a/game/server/baseanimating.cpp b/game/server/baseanimating.cpp index 58fd656d..f2bfccfb 100644 --- a/game/server/baseanimating.cpp +++ b/game/server/baseanimating.cpp @@ -300,7 +300,7 @@ CBaseAnimating::~CBaseAnimating() void CBaseAnimating::Precache() { -#if !defined( TF_DLL ) +#if !defined( TF_DLL ) && !defined( TF_MOD ) // Anything derived from this class can potentially burn - true, but do we want it to! PrecacheParticleSystem( "burning_character" ); #endif @@ -2591,7 +2591,7 @@ CBoneCache *CBaseAnimating::GetBoneCache( void ) int boneMask = BONE_USED_BY_HITBOX | BONE_USED_BY_ATTACHMENT; // TF queries these bones to position weapons when players are killed -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) boneMask |= BONE_USED_BY_BONE_MERGE; #endif if ( pcache ) diff --git a/game/server/baseanimating.h b/game/server/baseanimating.h index 75300e8e..a176bd80 100644 --- a/game/server/baseanimating.h +++ b/game/server/baseanimating.h @@ -521,7 +521,7 @@ EXTERN_SEND_TABLE(DT_BaseAnimating); #define ANIMATION_SKIN_BITS 10 // 1024 body skin selections FIXME: this seems way high #define ANIMATION_BODY_BITS 32 // body combinations #define ANIMATION_HITBOXSET_BITS 2 // hit box sets -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) #define ANIMATION_POSEPARAMETER_BITS 8 // pose parameter resolution #else #define ANIMATION_POSEPARAMETER_BITS 11 // pose parameter resolution diff --git a/game/server/basecombatweapon.cpp b/game/server/basecombatweapon.cpp index c05cb33d..e20af4fa 100644 --- a/game/server/basecombatweapon.cpp +++ b/game/server/basecombatweapon.cpp @@ -69,7 +69,7 @@ void W_Precache(void) g_sModelIndexLaserDot = CBaseEntity::PrecacheModel("sprites/laserdot.vmt"); #endif // HL1_DLL -#ifndef TF_DLL +#ifndef TF_DLL && TF_MOD g_sModelIndexFireball = CBaseEntity::PrecacheModel ("sprites/zerogxplode.vmt");// fireball g_sModelIndexSmoke = CBaseEntity::PrecacheModel ("sprites/steam1.vmt");// smoke diff --git a/game/server/cbase.cpp b/game/server/cbase.cpp index 55d59076..a71ef3bf 100644 --- a/game/server/cbase.cpp +++ b/game/server/cbase.cpp @@ -281,7 +281,7 @@ void CBaseEntityOutput::FireOutput(variant_t Value, CBaseEntity *pActivator, CBa Q_snprintf( szBuffer, sizeof(szBuffer), "(%0.2f) output: (%s,%s) -> (%s,%s,%.1f)(%s)\n", -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD engine->GetServerTime(), #else gpGlobals->curtime, @@ -302,7 +302,7 @@ void CBaseEntityOutput::FireOutput(variant_t Value, CBaseEntity *pActivator, CBa Q_snprintf( szBuffer, sizeof(szBuffer), "(%0.2f) output: (%s,%s) -> (%s,%s)(%s)\n", -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD engine->GetServerTime(), #else gpGlobals->curtime, @@ -776,7 +776,7 @@ void CEventQueue::Dump( void ) EventQueuePrioritizedEvent_t *pe = m_Events.m_pNext; Msg("Dumping event queue. Current time is: %.2f\n", -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD engine->GetServerTime() #else gpGlobals->curtime @@ -809,7 +809,7 @@ void CEventQueue::AddEvent( const char *target, const char *targetInput, variant { // build the new event EventQueuePrioritizedEvent_t *newEvent = new EventQueuePrioritizedEvent_t; -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD newEvent->m_flFireTime = engine->GetServerTime() + fireDelay; // priority key in the priority queue #else newEvent->m_flFireTime = gpGlobals->curtime + fireDelay; // priority key in the priority queue @@ -832,7 +832,7 @@ void CEventQueue::AddEvent( CBaseEntity *target, const char *targetInput, varian { // build the new event EventQueuePrioritizedEvent_t *newEvent = new EventQueuePrioritizedEvent_t; -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD newEvent->m_flFireTime = engine->GetServerTime() + fireDelay; // primary priority key in the priority queue #else newEvent->m_flFireTime = gpGlobals->curtime + fireDelay; // primary priority key in the priority queue @@ -907,7 +907,7 @@ void CEventQueue::ServiceEvents( void ) EventQueuePrioritizedEvent_t *pe = m_Events.m_pNext; -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD while ( pe != NULL && pe->m_flFireTime <= engine->GetServerTime() ) #else while ( pe != NULL && pe->m_flFireTime <= gpGlobals->curtime ) @@ -1197,7 +1197,7 @@ int CEventQueue::Restore( IRestore &restore ) AddEvent( tmpEvent.m_pEntTarget, STRING(tmpEvent.m_iTargetInput), tmpEvent.m_VariantValue, -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD tmpEvent.m_flFireTime - engine->GetServerTime(), #else tmpEvent.m_flFireTime - gpGlobals->curtime, @@ -1211,7 +1211,7 @@ int CEventQueue::Restore( IRestore &restore ) AddEvent( STRING(tmpEvent.m_iTarget), STRING(tmpEvent.m_iTargetInput), tmpEvent.m_VariantValue, -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD tmpEvent.m_flFireTime - engine->GetServerTime(), #else tmpEvent.m_flFireTime - gpGlobals->curtime, diff --git a/game/server/gameinterface.cpp b/game/server/gameinterface.cpp index d3334989..c13f30af 100644 --- a/game/server/gameinterface.cpp +++ b/game/server/gameinterface.cpp @@ -832,7 +832,7 @@ float CServerGameDLL::GetTickInterval( void ) const // [Forrest] For Counter-Strike, set default tick rate of 66 and removed -tickrate command line parameter. //============================================================================= // Ignoring this for now, server ops are abusing it -#if !defined( TF_DLL ) && !defined( CSTRIKE_DLL ) && !defined( DOD_DLL ) +#if !defined( TF_DLL ) && !defined( CSTRIKE_DLL ) && !defined( DOD_DLL ) && !defined( TF_MOD ) //============================================================================= // HPE_END //============================================================================= @@ -1887,7 +1887,7 @@ void CServerGameDLL::SetServerHibernation( bool bHibernating ) const char *CServerGameDLL::GetServerBrowserMapOverride() { -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() ) { const char *pszFilenameShort = g_pPopulationManager ? g_pPopulationManager->GetPopulationFilenameShort() : NULL; @@ -1904,7 +1904,7 @@ const char *CServerGameDLL::GetServerBrowserGameData() { CUtlString sResult; -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD sResult.Format( "tf_mm_trusted:%d,tf_mm_servermode:%d", tf_mm_trusted.GetInt(), tf_mm_servermode.GetInt() ); CMatchInfo *pMatch = GTFGCClientSystem()->GetMatch(); diff --git a/game/server/gameinterface.h b/game/server/gameinterface.h index 3092d4f3..1113aa31 100644 --- a/game/server/gameinterface.h +++ b/game/server/gameinterface.h @@ -19,7 +19,7 @@ class IReplayFactory; extern INetworkStringTable *g_pStringTableInfoPanel; extern INetworkStringTable *g_pStringTableServerMapCycle; -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD extern INetworkStringTable *g_pStringTableServerPopFiles; #endif diff --git a/game/server/item_world.cpp b/game/server/item_world.cpp index e4233172..cfa9e80c 100644 --- a/game/server/item_world.cpp +++ b/game/server/item_world.cpp @@ -98,7 +98,7 @@ BEGIN_DATADESC( CItem ) DEFINE_THINKFUNC( Materialize ), DEFINE_THINKFUNC( ComeToRest ), -#if defined( HL2MP ) || defined( TF_DLL ) +#if defined( HL2MP ) || defined( TF_DLL ) || defined( TF_MOD ) DEFINE_FIELD( m_flNextResetCheckTime, FIELD_TIME ), DEFINE_THINKFUNC( FallThink ), #endif @@ -202,7 +202,7 @@ void CItem::Spawn( void ) } #endif //CLIENT_DLL -#if defined( HL2MP ) || defined( TF_DLL ) +#if defined( HL2MP ) || defined( TF_DLL ) || defined( TF_MOD ) SetThink( &CItem::FallThink ); SetNextThink( gpGlobals->curtime + 0.1f ); #endif @@ -272,7 +272,7 @@ void CItem::ComeToRest( void ) } } -#if defined( HL2MP ) || defined( TF_DLL ) +#if defined( HL2MP ) || defined( TF_DLL ) || defined( TF_MOD ) //----------------------------------------------------------------------------- // Purpose: Items that have just spawned run this think to catch them when @@ -307,7 +307,7 @@ void CItem::FallThink ( void ) } #endif // HL2MP -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) // We only come here if ActivateWhenAtRest() is never called, // which is the case when creating currencypacks in MvM if ( !( GetFlags() & FL_ONGROUND ) ) @@ -472,7 +472,7 @@ CBaseEntity* CItem::Respawn( void ) UTIL_SetOrigin( this, g_pGameRules->VecItemRespawnSpot( this ) );// blip to whereever you should respawn. SetAbsAngles( g_pGameRules->VecItemRespawnAngles( this ) );// set the angles. -#if !defined( TF_DLL ) +#if !defined( TF_DLL ) && !defined( TF_MOD ) UTIL_DropToFloor( this, MASK_SOLID ); #endif diff --git a/game/server/items.h b/game/server/items.h index 5e7672c6..29421e9b 100644 --- a/game/server/items.h +++ b/game/server/items.h @@ -74,7 +74,7 @@ public: bool CreateItemVPhysicsObject( void ); virtual bool ItemCanBeTouchedByPlayer( CBasePlayer *pPlayer ); -#if defined( HL2MP ) || defined( TF_DLL ) +#if defined( HL2MP ) || defined( TF_DLL ) || defined( TF_MOD ) void FallThink( void ); float m_flNextResetCheckTime; #endif diff --git a/game/server/player.cpp b/game/server/player.cpp index 0538f90a..95098f5c 100644 --- a/game/server/player.cpp +++ b/game/server/player.cpp @@ -5014,7 +5014,7 @@ void CBasePlayer::Spawn( void ) m_vecSmoothedVelocity = vec3_origin; InitVCollision( GetAbsOrigin(), GetAbsVelocity() ); -#if !defined( TF_DLL ) +#if !defined( TF_DLL ) && !defined( TF_MOD ) IGameEvent *event = gameeventmanager->CreateEvent( "player_spawn" ); if ( event ) @@ -5069,7 +5069,7 @@ void CBasePlayer::Precache( void ) enginesound->PrecacheSentenceGroup( "HEV" ); // These are always needed -#ifndef TF_DLL +#if !( defined( TF_DLL ) || defined( TF_MOD ) ) PrecacheParticleSystem( "slime_splash_01" ); PrecacheParticleSystem( "slime_splash_02" ); PrecacheParticleSystem( "slime_splash_03" ); @@ -9012,7 +9012,7 @@ bool CPlayerInfo::IsHLTV() bool CPlayerInfo::IsReplay() { -#ifdef TF_DLL // FIXME: Need run-time check for whether replay is enabled +#if !defined ( TF_DLL ) && !defined ( TF_MOD ) // FIXME: Need run-time check for whether replay is enabled Assert( m_pParent ); return m_pParent->IsReplay(); #else @@ -9361,4 +9361,4 @@ uint64 CBasePlayer::GetSteamIDAsUInt64( void ) return steamIDForPlayer.ConvertToUint64(); return 0; } -#endif // NO_STEAM \ No newline at end of file +#endif // NO_STEAM diff --git a/game/server/te_particlesystem.cpp b/game/server/te_particlesystem.cpp index adacb066..91b12ec3 100644 --- a/game/server/te_particlesystem.cpp +++ b/game/server/te_particlesystem.cpp @@ -15,7 +15,7 @@ #include "tier0/memdbgon.h" IMPLEMENT_SERVERCLASS_ST(CTEParticleSystem, DT_TEParticleSystem) -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) SendPropFloat( SENDINFO_VECTORELEM( m_vecOrigin, 0 ), -1, SPROP_COORD_MP_INTEGRAL ), SendPropFloat( SENDINFO_VECTORELEM( m_vecOrigin, 1 ), -1, SPROP_COORD_MP_INTEGRAL ), SendPropFloat( SENDINFO_VECTORELEM( m_vecOrigin, 2 ), -1, SPROP_COORD_MP_INTEGRAL ), diff --git a/game/server/te_worlddecal.cpp b/game/server/te_worlddecal.cpp index 028e0bb7..3fcf5645 100644 --- a/game/server/te_worlddecal.cpp +++ b/game/server/te_worlddecal.cpp @@ -89,7 +89,7 @@ void CTEWorldDecal::Test( const Vector& current_origin, const QAngle& current_an } IMPLEMENT_SERVERCLASS_ST(CTEWorldDecal, DT_TEWorldDecal) -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) SendPropVector( SENDINFO(m_vecOrigin), -1, SPROP_COORD_MP_INTEGRAL ), #else SendPropVector( SENDINFO(m_vecOrigin), -1, SPROP_COORD), @@ -118,4 +118,4 @@ void TE_WorldDecal( IRecipientFilter& filter, float delay, // Send it over the wire g_TEWorldDecal.Create( filter, delay ); -} \ No newline at end of file +} diff --git a/game/server/team_control_point.cpp b/game/server/team_control_point.cpp index 1bbec70a..192f7de7 100644 --- a/game/server/team_control_point.cpp +++ b/game/server/team_control_point.cpp @@ -15,7 +15,7 @@ #include "engine/IEngineSound.h" #include "soundenvelope.h" -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD #include "tf_shareddefs.h" #endif @@ -83,7 +83,7 @@ CTeamControlPoint::CTeamControlPoint() m_bLocked = false; m_flUnlockTime = -1; -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD UseClientSideAnimation(); #endif } @@ -100,7 +100,7 @@ void CTeamControlPoint::Spawn( void ) m_iDefaultOwner = TEAM_UNASSIGNED; } -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD if ( m_iszCaptureStartSound == NULL_STRING ) { m_iszCaptureStartSound = AllocPooledString( "Hologram.Start" ); @@ -267,7 +267,7 @@ void CTeamControlPoint::Precache( void ) PrecacheScriptSound( STRING( m_iszWarnSound ) ); } -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD PrecacheScriptSound( "Announcer.ControlPointContested" ); #endif } @@ -306,7 +306,7 @@ void CTeamControlPoint::HandleScoring( int iTeam ) CTeamControlPointMaster *pMaster = g_hControlPointMasters.Count() ? g_hControlPointMasters[0] : NULL; if ( pMaster && !pMaster->WouldNewCPOwnerWinGame( this, iTeam ) ) { -#ifdef TF_DLL +#ifdef TF_DLL || TF_MOD if ( TeamplayRoundBasedRules()->GetGameType() == TF_GAMETYPE_ESCORT ) { CBroadcastRecipientFilter filter; diff --git a/game/server/triggers.cpp b/game/server/triggers.cpp index 5bdda3d7..57e8734f 100644 --- a/game/server/triggers.cpp +++ b/game/server/triggers.cpp @@ -361,7 +361,7 @@ bool CBaseTrigger::PassesTriggerFilters(CBaseEntity *pOther) (HasSpawnFlags(SF_TRIGGER_ALLOW_NPCS) && (pOther->GetFlags() & FL_NPC)) || (HasSpawnFlags(SF_TRIGGER_ALLOW_PUSHABLES) && FClassnameIs(pOther, "func_pushable")) || (HasSpawnFlags(SF_TRIGGER_ALLOW_PHYSICS) && pOther->GetMoveType() == MOVETYPE_VPHYSICS) -#if defined( HL2_EPISODIC ) || defined( TF_DLL ) +#if defined( HL2_EPISODIC ) || defined( TF_DLL ) || defined( TF_MOD ) || ( HasSpawnFlags(SF_TRIG_TOUCH_DEBRIS) && (pOther->GetCollisionGroup() == COLLISION_GROUP_DEBRIS || diff --git a/game/shared/achievementmgr.cpp b/game/shared/achievementmgr.cpp index 33970f5d..42d61b7b 100644 --- a/game/shared/achievementmgr.cpp +++ b/game/shared/achievementmgr.cpp @@ -43,7 +43,7 @@ #include "engine/imatchmaking.h" #include "tier0/vprof.h" -#if defined(TF_DLL) || defined(TF_CLIENT_DLL) +#if defined(TF_DLL) || defined(TF_CLIENT_DLL) || defined( TF_MOD ) || defined( TF_MOD_CLIENT ) #include "tf_gamerules.h" #endif @@ -322,7 +322,7 @@ bool CAchievementMgr::Init() usermessages->HookMessage( "AchievementEvent", MsgFunc_AchievementEvent ); #endif // CLIENT_DLL -#ifdef TF_CLIENT_DLL +#ifdef TF_CLIENT_DLL || TF_MOD_CLIENT ListenForGameEvent( "localplayer_changeclass" ); ListenForGameEvent( "localplayer_changeteam" ); ListenForGameEvent( "teamplay_round_start" ); @@ -1093,7 +1093,7 @@ bool CAchievementMgr::CheckAchievementsEnabled() //============================================================================= #endif // CSTRIKE_DLL -#if defined(TF_DLL) || defined(TF_CLIENT_DLL) +#if defined(TF_DLL) || defined(TF_CLIENT_DLL) || defined(TF_MOD) || defined(TF_MOD_CLIENT) // no achievements for now in training if ( TFGameRules() && TFGameRules()->IsInTraining() && TFGameRules()->AllowTrainingAchievements() == false ) { diff --git a/game/shared/basecombatweapon_shared.cpp b/game/shared/basecombatweapon_shared.cpp index 0b35d147..edf7ad38 100644 --- a/game/shared/basecombatweapon_shared.cpp +++ b/game/shared/basecombatweapon_shared.cpp @@ -20,7 +20,7 @@ #endif // NVNT end extra includes -#if defined ( TF_DLL ) || defined ( TF_CLIENT_DLL ) +#if defined ( TF_DLL ) || defined ( TF_CLIENT_DLL ) || defined( TF_MOD ) || defined( TF_MOD_CLIENT ) #include "tf_shareddefs.h" #endif @@ -51,7 +51,7 @@ extern bool UTIL_ItemCanBeTouchedByPlayer( CBaseEntity *pItem, CBasePlayer *pPlayer ); -#if defined ( TF_CLIENT_DLL ) || defined ( TF_DLL ) +#if defined ( TF_CLIENT_DLL ) || defined ( TF_DLL ) || defined ( TF_MOD_CLIENT ) || defined ( TF_MOD ) #ifdef _DEBUG ConVar tf_weapon_criticals_force_random( "tf_weapon_criticals_force_random", "0", FCVAR_REPLICATED | FCVAR_CHEAT ); #endif // _DEBUG @@ -94,11 +94,11 @@ CBaseCombatWeapon::CBaseCombatWeapon() : BASECOMBATWEAPON_DERIVED_FROM() m_hWeaponFileInfo = GetInvalidWeaponInfoHandle(); -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) UseClientSideAnimation(); #endif -#if defined ( TF_CLIENT_DLL ) || defined ( TF_DLL ) +#if defined ( TF_CLIENT_DLL ) || defined ( TF_DLL ) || defined ( TF_MOD_CLIENT ) || defined ( TF_MOD ) m_flCritTokenBucket = tf_weapon_criticals_bucket_default.GetFloat(); m_nCritChecks = 1; m_nCritSeedRequests = 0; @@ -249,10 +249,10 @@ void CBaseCombatWeapon::Precache( void ) { Msg("ERROR: Weapon (%s) using undefined primary ammo type (%s)\n",GetClassname(), GetWpnData().szAmmo1); } - #if defined ( TF_DLL ) || defined ( TF_CLIENT_DLL ) +#if defined ( TF_DLL ) || defined ( TF_CLIENT_DLL ) || defined ( TF_MOD_CLIENT ) || defined ( TF_MOS ) // Ammo override int iModUseMetalOverride = 0; - CALL_ATTRIB_HOOK_INT( iModUseMetalOverride, mod_use_metal_ammo_type ); + //CALL_ATTRIB_HOOK_INT( iModUseMetalOverride, mod_use_metal_ammo_type ); if ( iModUseMetalOverride ) { m_iPrimaryAmmoType = (int)TF_AMMO_METAL; @@ -347,9 +347,9 @@ const char *CBaseCombatWeapon::GetPrintName( void ) const //----------------------------------------------------------------------------- int CBaseCombatWeapon::GetMaxClip1( void ) const { -#if defined ( TF_DLL ) || defined ( TF_CLIENT_DLL ) +#if defined ( TF_DLL ) || defined ( TF_CLIENT_DLL ) || defined ( TF_MOD_CLIENT ) || defined ( TF_MOD ) int iModMaxClipOverride = 0; - CALL_ATTRIB_HOOK_INT( iModMaxClipOverride, mod_max_primary_clip_override ); + //CALL_ATTRIB_HOOK_INT( iModMaxClipOverride, mod_max_primary_clip_override ); if ( iModMaxClipOverride != 0 ) return iModMaxClipOverride; #endif @@ -1552,7 +1552,7 @@ bool CBaseCombatWeapon::CanReload( void ) return true; } -#if defined ( TF_CLIENT_DLL ) || defined ( TF_DLL ) +#if defined ( TF_CLIENT_DLL ) || defined ( TF_DLL ) || defined ( TF_MOD_CLIENT ) || defined ( TF_MOD ) //----------------------------------------------------------------------------- // Purpose: Anti-hack //----------------------------------------------------------------------------- @@ -2017,16 +2017,16 @@ bool CBaseCombatWeapon::DefaultReload( int iClipSize1, int iClipSize2, int iActi bool CBaseCombatWeapon::ReloadsSingly( void ) const { -#if defined ( TF_DLL ) || defined ( TF_CLIENT_DLL ) +#if defined ( TF_DLL ) || defined ( TF_CLIENT_DLL ) || defined ( TF_MOD_CLIENT ) || defined ( TF_MOD ) float fHasReload = 1.0f; - CALL_ATTRIB_HOOK_FLOAT( fHasReload, mod_no_reload_display_only ); + //CALL_ATTRIB_HOOK_FLOAT( fHasReload, mod_no_reload_display_only ); if ( fHasReload != 1.0f ) { return false; } int iWeaponMod = 0; - CALL_ATTRIB_HOOK_INT( iWeaponMod, set_scattergun_no_reload_single ); + //CALL_ATTRIB_HOOK_INT( iWeaponMod, set_scattergun_no_reload_single ); if ( iWeaponMod == 1 ) { return false; @@ -2744,7 +2744,7 @@ BEGIN_NETWORK_TABLE_NOBASE( CBaseCombatWeapon, DT_LocalActiveWeaponData ) SendPropInt( SENDINFO( m_nNextThinkTick ) ), SendPropTime( SENDINFO( m_flTimeWeaponIdle ) ), -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) SendPropExclude( "DT_AnimTimeMustBeFirst" , "m_flAnimTime" ), #endif @@ -2770,7 +2770,7 @@ BEGIN_NETWORK_TABLE_NOBASE( CBaseCombatWeapon, DT_LocalWeaponData ) SendPropInt( SENDINFO( m_bFlipViewModel ) ), -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) SendPropExclude( "DT_AnimTimeMustBeFirst" , "m_flAnimTime" ), #endif diff --git a/game/shared/basecombatweapon_shared.h b/game/shared/basecombatweapon_shared.h index 701403a0..b65b4e95 100644 --- a/game/shared/basecombatweapon_shared.h +++ b/game/shared/basecombatweapon_shared.h @@ -526,7 +526,7 @@ private: CNetworkVar( CBaseCombatCharacterHandle, m_hOwner ); // Player carrying this weapon protected: -#if defined ( TF_CLIENT_DLL ) || defined ( TF_DLL ) +#if defined ( TF_CLIENT_DLL ) || defined ( TF_DLL ) || defined ( TF_MOD_CLIENT ) || defined ( TF_MOD ) // Regulate crit frequency to reduce client-side seed hacking void AddToCritBucket( float flAmount ); void RemoveFromCritBucket( float flAmount ) { m_flCritTokenBucket -= flAmount; } diff --git a/game/shared/basegrenade_shared.cpp b/game/shared/basegrenade_shared.cpp index b981d078..e7f09675 100644 --- a/game/shared/basegrenade_shared.cpp +++ b/game/shared/basegrenade_shared.cpp @@ -129,7 +129,7 @@ void CBaseGrenade::Explode( trace_t *pTrace, int bitsDamageType ) Vector vecAbsOrigin = GetAbsOrigin(); int contents = UTIL_PointContents ( vecAbsOrigin ); -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) // Since this code only runs on the server, make sure it shows the tempents it creates. // This solves a problem with remote detonating the pipebombs (client wasn't seeing the explosion effect) CDisablePredictionFiltering disabler; diff --git a/game/shared/baseviewmodel_shared.cpp b/game/shared/baseviewmodel_shared.cpp index 20538e8c..2390e2ab 100644 --- a/game/shared/baseviewmodel_shared.cpp +++ b/game/shared/baseviewmodel_shared.cpp @@ -91,7 +91,7 @@ void CBaseViewModel::Spawn( void ) #define VGUI_CONTROL_PANELS #endif -#if defined ( TF_DLL ) +#if defined ( TF_DLL ) || defined( TF_MOD ) #define VGUI_CONTROL_PANELS #endif diff --git a/game/shared/effect_dispatch_data.cpp b/game/shared/effect_dispatch_data.cpp index e295991f..f5816958 100644 --- a/game/shared/effect_dispatch_data.cpp +++ b/game/shared/effect_dispatch_data.cpp @@ -101,7 +101,7 @@ #endif SendPropQAngles( SENDINFO_NOCHECK( m_vAngles ), 7 ), -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) SendPropVector( SENDINFO_NOCHECK( m_vNormal ), 6, 0, -1.0f, 1.0f ), #else SendPropVector( SENDINFO_NOCHECK( m_vNormal ), 0, SPROP_NORMAL ), diff --git a/game/shared/gamerules.cpp b/game/shared/gamerules.cpp index f24d5658..4815406d 100644 --- a/game/shared/gamerules.cpp +++ b/game/shared/gamerules.cpp @@ -262,7 +262,7 @@ void CGameRules::RefreshSkillData ( bool forceUpdate ) } GlobalEntity_Add( "skill.cfg", STRING(gpGlobals->mapname), GLOBAL_ON ); -#if !defined( TF_DLL ) && !defined( DOD_DLL ) +#if !defined( TF_DLL ) && !defined( DOD_DLL ) && !defined( TF_MOD ) char szExec[256]; #endif @@ -279,7 +279,7 @@ void CGameRules::RefreshSkillData ( bool forceUpdate ) engine->ServerExecute(); #else -#if !defined( TF_DLL ) && !defined( DOD_DLL ) +#if !defined( TF_DLL ) && !defined( DOD_DLL ) && !defined( TF_MOD ) Q_snprintf( szExec,sizeof(szExec), "exec skill%d.cfg\n", GetSkillLevel() ); engine->ServerCommand( szExec ); diff --git a/game/shared/multiplay_gamerules.cpp b/game/shared/multiplay_gamerules.cpp index abecba9e..815c5725 100644 --- a/game/shared/multiplay_gamerules.cpp +++ b/game/shared/multiplay_gamerules.cpp @@ -117,7 +117,7 @@ void cc_GotoNextMapInCycle() ConCommand skip_next_map( "skip_next_map", cc_SkipNextMapInCycle, "Skips the next map in the map rotation for the server." ); ConCommand changelevel_next( "changelevel_next", cc_GotoNextMapInCycle, "Immediately changes to the next map in the map rotation for the server." ); -#ifndef TF_DLL // TF overrides the default value of this convar +#ifndef TF_DLL && TF_MOD // TF overrides the default value of this convar ConVar mp_waitingforplayers_time( "mp_waitingforplayers_time", "0", FCVAR_GAMEDLL, "WaitingForPlayers time length in seconds" ); #endif @@ -129,12 +129,11 @@ ConVar mp_clan_ready_signal( "mp_clan_ready_signal", "ready", FCVAR_GAMEDLL, "Te ConVar nextlevel( "nextlevel", "", FCVAR_GAMEDLL | FCVAR_NOTIFY, -#if defined( CSTRIKE_DLL ) || defined( TF_DLL ) +#if defined( CSTRIKE_DLL ) || defined( TF_DLL ) || defined( TF_MOD ) "If set to a valid map name, will trigger a changelevel to the specified map at the end of the round" ); #else "If set to a valid map name, will change to this map during the next changelevel" ); #endif // CSTRIKE_DLL || TF_DLL - #endif #ifndef CLIENT_DLL @@ -342,7 +341,7 @@ bool CMultiplayRules::Init() // override some values for multiplay. // suitcharger -#ifndef TF_DLL +#ifndef TF_DLL && TF_MOD //============================================================================= // HPE_BEGIN: // [menglish] CS doesn't have the suitcharger either @@ -1372,7 +1371,7 @@ ConVarRef suitcharger( "sk_suitcharger" ); g_pStringTableServerMapCycle->AddString( CBaseEntity::IsServer(), "ServerMapCycle", sFileList.Length() + 1, sFileList.String() ); } -#if defined ( TF_DLL ) || defined ( TF_CLIENT_DLL ) +#if defined ( TF_DLL ) || defined ( TF_CLIENT_DLL )// || defined( TF_MOD ) || defined( TF_MOD_CLIENT ) if ( g_pStringTableServerPopFiles ) { // Search for all pop files that are prefixed with the current map name diff --git a/game/shared/particlesystemquery.cpp b/game/shared/particlesystemquery.cpp index b97a334b..d3b7000d 100644 --- a/game/shared/particlesystemquery.cpp +++ b/game/shared/particlesystemquery.cpp @@ -14,7 +14,7 @@ #include "c_pixel_visibility.h" #endif -#ifdef TF_CLIENT_DLL +#if defined( TF_CLIENT_DLL ) || defined( TF_MOD_CLIENT ) #include "tf_shareddefs.h" #endif @@ -551,7 +551,7 @@ static CollisionGroupNameRecord_t s_NameMap[]={ { "NPC", COLLISION_GROUP_NPC }, { "ACTOR", COLLISION_GROUP_NPC_ACTOR }, { "PASSABLE", COLLISION_GROUP_PASSABLE_DOOR }, -#if defined( TF_CLIENT_DLL ) +#if defined( TF_CLIENT_DLL ) || defined( TF_MOD_CLIENT ) { "ROCKETS", TFCOLLISION_GROUP_ROCKETS }, #endif }; diff --git a/game/shared/ragdoll_shared.cpp b/game/shared/ragdoll_shared.cpp index b43109a4..c99076d8 100644 --- a/game/shared/ragdoll_shared.cpp +++ b/game/shared/ragdoll_shared.cpp @@ -646,7 +646,7 @@ void RagdollSolveSeparation( ragdoll_t &ragdoll, CBaseEntity *pEntity ) if ( dir.LengthSqr() > 1.0f ) { // this fixes a bug in ep2 with antlion grubs, but causes problems in TF2 - revisit, but disable for TF now -#if !defined(TF_CLIENT_DLL) +#if !defined(TF_CLIENT_DLL) && !defined( TF_MOD_CLIENT ) // heuristic: guess that anything separated and small mass ratio is in some state that's // keeping the solver from fixing it float mass = element.pObject->GetMass(); diff --git a/game/shared/shareddefs.h b/game/shared/shareddefs.h index 4b41d00a..791a1adc 100644 --- a/game/shared/shareddefs.h +++ b/game/shared/shareddefs.h @@ -19,7 +19,7 @@ #define ROUND_TO_TICKS( t ) ( TICK_INTERVAL * TIME_TO_TICKS( t ) ) #define TICK_NEVER_THINK (-1) -#if defined( TF_DLL ) +#if defined( TF_DLL ) || defined( TF_MOD ) #define ANIMATION_CYCLE_BITS 10 #else #define ANIMATION_CYCLE_BITS 15 @@ -102,7 +102,7 @@ public: #define MAX_CLIMB_SPEED 200 -#if defined(TF_DLL) || defined(TF_CLIENT_DLL) +#if defined(TF_DLL) || defined(TF_CLIENT_DLL) || defined( TF_MOD ) || defined( TF_MOD_CLIENT ) #define TIME_TO_DUCK 0.2 #define TIME_TO_DUCK_MS 200.0f #else @@ -881,7 +881,7 @@ enum //----------------------------------------------------------------------------- // Commentary Mode //----------------------------------------------------------------------------- -#if defined(TF_DLL) || defined(TF_CLIENT_DLL) +#if defined(TF_DLL) || defined(TF_CLIENT_DLL) || defined( TF_MOD ) || defined( TF_MOD_CLIENT ) #define GAME_HAS_NO_USE_KEY #if defined( SPROP_COORD ) @@ -923,7 +923,7 @@ enum kActivityLookup_Missing = -1, // has been searched for but wasn't found }; -#if defined(TF_DLL) || defined(TF_CLIENT_DLL) +#if defined(TF_DLL) || defined(TF_CLIENT_DLL) || defined( TF_MOD ) || defined( TF_MOD_CLIENT ) //----------------------------------------------------------------------------- // Vision Filters. //----------------------------------------------------------------------------- diff --git a/game/shared/weapon_ifmsteadycam.cpp b/game/shared/weapon_ifmsteadycam.cpp index dcdc8a6c..9e23a791 100644 --- a/game/shared/weapon_ifmsteadycam.cpp +++ b/game/shared/weapon_ifmsteadycam.cpp @@ -26,7 +26,7 @@ //----------------------------------------------------------------------------- IMPLEMENT_NETWORKCLASS_ALIASED( WeaponIFMSteadyCam, DT_WeaponIFMSteadyCam ) LINK_ENTITY_TO_CLASS( weapon_ifm_steadycam, CWeaponIFMSteadyCam ); -#if !( defined( TF_CLIENT_DLL ) || defined( TF_DLL ) ) +#if !( defined( TF_CLIENT_DLL ) || defined( TF_DLL ) || defined( TF_MOD ) || defined( TF_MOD_CLIENT ) ) PRECACHE_WEAPON_REGISTER( weapon_ifm_steadycam ); #endif