Hope this commits it fixes bad commits.
This commit is contained in:
whoozzem 2013-09-20 18:41:21 +01:00
commit 3b15c7d8b1
3 changed files with 16 additions and 62 deletions

View file

@ -170,11 +170,6 @@ const char *COM_GetModDirectory(); // return the mod dir (rather than the comple
#include "sixense/in_sixense.h"
#endif
//4WH
#include "filesystem_init.h"
//!!!
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
@ -957,10 +952,6 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi
// it's ok if this is NULL. That just means the headtrack.dll wasn't found
g_pSourceVR = (ISourceVirtualReality *)appSystemFactory(SOURCE_VIRTUAL_REALITY_INTERFACE_VERSION, NULL);
Msg ("These are the client search paths");
filesystem->PrintSearchPaths();
#ifdef Seco7_USE_STATIC_MOUNT_CODE
//4WH - Information: This is our base game mount code. It relies on a text file to hold all the search paths/AppIDs which your mod requires. Make sure people know what you add to this, because if they don't have the
@ -988,10 +979,9 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi
break;
}
#endif //Seco7_ENABLE_PORTAL_CONTENT_MOUNTING
filesystem->AddSearchPath(pszMountPath, "GAME");
filesystem->MountSteamContent(nMountID);
}
pkvMount = pkvMount->GetNextKey();
@ -1658,6 +1648,10 @@ void CHLClient::LevelInitPreEntity( char const* pMapName )
filesystem->RemoveAllSearchPaths(); // We have to remove all search paths or the game gets confused about model vertex counts etc.
filesystem->AddSearchPath("ep2", "EXECUTABLE_PATH");
filesystem->AddSearchPath("ep2", "PLATFORM");
//filesystem->AddSearchPath("../../../steamapps/common/Half-Life 2/ep2/bin" //Exe Path
//filesystem->AddSearchPath("../../../steamapps/common/Half-Life 2/ep2" //Platform Path
filesystem->AddSearchPath("../../../steamapps/SourceMods/mod_hl2mp", "MOD");
filesystem->AddSearchPath("../../../steamapps/SourceMods/mod_hl2mp/bin", "GAMEBIN");
filesystem->AddSearchPath("../../../steamapps/SourceMods/mod_hl2mp", "GAME");
@ -1679,9 +1673,9 @@ void CHLClient::LevelInitPreEntity( char const* pMapName )
//=================
if (sv_ep1_mount.GetBool())
{
//filesystem->RemoveAllSearchPaths(); // We have to remove all search paths or the game gets confused about model vertex counts etc.
//filesystem->AddSearchPath("ep2", "EXECUTABLE_PATH");
//filesystem->AddSearchPath("ep2", "PLATFORM");
filesystem->RemoveAllSearchPaths(); // We have to remove all search paths or the game gets confused about model vertex counts etc.
filesystem->AddSearchPath("ep2", "EXECUTABLE_PATH");
filesystem->AddSearchPath("ep2", "PLATFORM");
filesystem->AddSearchPath("../../../steamapps/SourceMods/mod_hl2mp", "MOD");
filesystem->AddSearchPath("../../../steamapps/SourceMods/mod_hl2mp/bin", "GAMEBIN");
filesystem->AddSearchPath("../../../steamapps/SourceMods/mod_hl2mp", "GAME");
@ -1695,7 +1689,7 @@ void CHLClient::LevelInitPreEntity( char const* pMapName )
filesystem->AddSearchPath("../../../steamapps/SourceMods/mod_hl2mp", "LOGDIR");
filesystem->AddSearchPath("hl2mp", "GAME");
filesystem->MountSteamContent(-320); //Half-Life 2:Deathmatch
//filesystem->AddSearchPath("ep2", "GAME");
filesystem->AddSearchPath("ep2", "GAME");
#ifdef Seco7_ENABLE_PORTAL_CONTENT_MOUNTING
filesystem->AddSearchPath("portal", "GAME");

View file

@ -129,10 +129,6 @@ extern ConVar tf_mm_servermode;
#include "replay/ireplaysystem.h"
#endif
//4WH
#include "filesystem_init.h"
//!!!
extern IToolFrameworkServer *g_pToolFrameworkServer;
extern IParticleSystemQuery *g_pParticleSystemQuery;
@ -645,8 +641,6 @@ bool CServerGameDLL::DLLInit( CreateInterfaceFn appSystemFactory,
if ( !soundemitterbase->Connect( appSystemFactory ) )
return false;
#ifdef Seco7_USE_STATIC_MOUNT_CODE
//4WH - Information: This is our base game mount code. It relies on a text file to hold all the search paths/AppIDs which your mod requires. Make sure people know what you add to this, because if they don't have the
// game that you choose to mount here, they could well crash to desktop. The file is in the root of the compiled modification folder. This is how we allow people who have just loaded the game to use map and changelevel commands
@ -673,21 +667,10 @@ bool CServerGameDLL::DLLInit( CreateInterfaceFn appSystemFactory,
break;
}
#endif //Seco7_ENABLE_PORTAL_CONTENT_MOUNTING
//Ep2.
//if (nMountID == -420)
//{
filesystem->AddSearchPath("../../../steamapps/common/half-life2/ep2", "GAME");
filesystem->AddSearchPath("../../../steamapps/common/half-life2/ep2/ep2_sound_vo_english.vpk", "GAME");
filesystem->AddSearchPath("../../../steamapps/common/half-life2/ep2/ep2_pak.vpk", "GAME");
//}
filesystem->AddSearchPath(pszMountPath, "GAME");
filesystem->MountSteamContent(nMountID);
Msg ("These are the server search paths");
filesystem->PrintSearchPaths();
Msg( "Mounted additional content: %s\n", pszMountName );
}
@ -1076,8 +1059,8 @@ bool CServerGameDLL::LevelInit( const char *pMapName, char const *pMapEntities,
Msg("HALFLIFE 2 CONTENT IS BEING MOUNTED! \n");
filesystem->RemoveAllSearchPaths(); // We have to remove all search paths or the game gets confused about model vertex counts etc.
//4WH - Information: Dedicated servers require different search paths to work.
filesystem->AddSearchPath("../ep2", "EXECUTABLE_PATH");
filesystem->AddSearchPath("../ep2", "PLATFORM");
//filesystem->AddSearchPath("../orangebox", "EXECUTABLE_PATH");
//filesystem->AddSearchPath("../orangebox", "PLATFORM");
if (sv_dedicated.GetBool())
{
filesystem->AddSearchPath("mod_hl2mp", "MOD");
@ -1123,11 +1106,11 @@ bool CServerGameDLL::LevelInit( const char *pMapName, char const *pMapEntities,
|| !Q_strnicmp( gpGlobals->mapname.ToCStr(), "seco7_ep1_", 10 ) ) //Mounts required for Episode 1 content.
{
Msg("EPISODE 1 CONTENT IS BEING MOUNTED! \n");
//filesystem->RemoveAllSearchPaths(); // We have to remove all search paths or the game gets confused about model vertex counts etc.
filesystem->RemoveAllSearchPaths(); // We have to remove all search paths or the game gets confused about model vertex counts etc.
//4WH - Information: Dedicated servers require different search paths to work.
//filesystem->AddSearchPath("../ep2", "EXECUTABLE_PATH");
// filesystem->AddSearchPath("../ep2", "PLATFORM");
filesystem->AddSearchPath("../ep2", "EXECUTABLE_PATH");
filesystem->AddSearchPath("../ep2", "PLATFORM");
if (sv_dedicated.GetBool())
{
filesystem->AddSearchPath("mod_hl2mp", "MOD");

View file

@ -7,35 +7,12 @@
#pragma once
#endif
//Besides the Valve Wiki page, further information and help can be found in the shared/seco/seco_information.h file.
// Mount them.
/*
FOR_EACH_VEC( vecFullLocationPaths, idxLocation )
{
FOR_EACH_VEC( vecPathIDs, idxPathID )
{
FileSystem_AddLoadedSearchPath( initInfo, vecPathIDs[ idxPathID ], vecFullLocationPaths[ idxLocation ], bLowViolence );
}
}*/
/*
// Also, mark specific path IDs as "by request only". That way, we won't waste time searching in them
// when people forget to specify a search path.
initInfo.m_pFileSystem->MarkPathIDByRequestOnly( "executable_path", true );
initInfo.m_pFileSystem->MarkPathIDByRequestOnly( "gamebin", true );
initInfo.m_pFileSystem->MarkPathIDByRequestOnly( "download", true );
initInfo.m_pFileSystem->MarkPathIDByRequestOnly( "mod", true );
initInfo.m_pFileSystem->MarkPathIDByRequestOnly( "game_write", true );
initInfo.m_pFileSystem->MarkPathIDByRequestOnly( "mod_write", true );
*/
/*****************/
/* Base Defines. */
/*****************/
#define Seco7_Enable_Fixed_Multiplayer_AI //Allow AI in your mod, also fixes numerous crashes to do with AI and related features.
#define HL2_EPISODIC //Choose Episode 2 code for preference. Reccomended for Orange Box. Disabling this means you must exclude all episodic cpp/h files from your project (due to compile erros you'll get otherwise).
#define Seco7_USE_STATIC_MOUNT_CODE //Use static mounting code to mount multiple games. This must also be defined for dynamic mounts.
//#define Seco7_USE_STATIC_MOUNT_CODE //Use static mounting code to mount multiple games. This must also be defined for dynamic mounts.
//#define Seco7_USE_DYNAMIC_MOUNT_CODE //This is a much better mounting system allowing for true content mounting as though a map were that game. Maps must be named ss_hl2_, ss_ep1_ and ss_ep2_ for valid mounting.
//s#define Seco7_ENABLE_PORTAL_CONTENT_MOUNTING //Portal is seperate to the rest of the mounting code as it will crash anyone without Portal installed in most cases if a Portal map is loaded.
#define Seco7_PREVENT_ITEM_WEAPON_RESPAWNING //Prevent items and weapons from respawning after picked up by a player. Actually we cheat and set the respawn time insanely high.