Add Steam's Quake 3 Arena dir to game dirs on Windows.
This commit is contained in:
parent
3001cacf89
commit
f860a753e0
5 changed files with 85 additions and 0 deletions
|
@ -250,6 +250,7 @@ static cvar_t *fs_homepath;
|
|||
// Also search the .app bundle for .pk3 files
|
||||
static cvar_t *fs_apppath;
|
||||
#endif
|
||||
static cvar_t *fs_steampath;
|
||||
|
||||
static cvar_t *fs_basepath;
|
||||
static cvar_t *fs_basegame;
|
||||
|
@ -748,6 +749,21 @@ long FS_SV_FOpenFileRead(const char *filename, fileHandle_t *fp)
|
|||
fsh[f].handleSync = qfalse;
|
||||
}
|
||||
|
||||
// Check fs_steampath too
|
||||
if (!fsh[f].handleFiles.file.o && fs_steampath->string[0])
|
||||
{
|
||||
ospath = FS_BuildOSPath( fs_steampath->string, filename, "" );
|
||||
ospath[strlen(ospath)-1] = '\0';
|
||||
|
||||
if ( fs_debug->integer )
|
||||
{
|
||||
Com_Printf( "FS_SV_FOpenFileRead (fs_steampath): %s\n", ospath );
|
||||
}
|
||||
|
||||
fsh[f].handleFiles.file.o = Sys_FOpen( ospath, "rb" );
|
||||
fsh[f].handleSync = qfalse;
|
||||
}
|
||||
|
||||
if ( !fsh[f].handleFiles.file.o )
|
||||
{
|
||||
f = 0;
|
||||
|
@ -3280,6 +3296,10 @@ static void FS_Startup( const char *gameName )
|
|||
fs_gamedirvar = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO );
|
||||
|
||||
// add search path elements in reverse priority order
|
||||
fs_steampath = Cvar_Get ("fs_steampath", Sys_SteamPath(), CVAR_INIT|CVAR_PROTECTED );
|
||||
if (fs_steampath->string[0]) {
|
||||
FS_AddGameDirectory( fs_steampath->string, gameName );
|
||||
}
|
||||
if (fs_basepath->string[0]) {
|
||||
FS_AddGameDirectory( fs_basepath->string, gameName );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue