From 38a9e52e616c7e7e1c7fd38acb033057cdc344c8 Mon Sep 17 00:00:00 2001 From: Alan Edwardes Date: Mon, 5 Aug 2013 15:46:31 +0100 Subject: [PATCH 1/3] Changed VBSP to check the MOD directory for FGD files specified in gameinfo.txt, in addition to EXECUTABLE_PATH. --- sp/src/utils/vbsp/map.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sp/src/utils/vbsp/map.cpp b/sp/src/utils/vbsp/map.cpp index 34219bd4..bbab291e 100644 --- a/sp/src/utils/vbsp/map.cpp +++ b/sp/src/utils/vbsp/map.cpp @@ -2003,9 +2003,12 @@ void CMapFile::CheckForInstances( const char *pszFileName ) char FDGPath[ MAX_PATH ]; if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "EXECUTABLE_PATH", FDGPath, sizeof( FDGPath ) ) ) { - if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "", FDGPath, sizeof( FDGPath ) ) ) + if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "MOD", FDGPath, sizeof( FDGPath ) ) ) { - Msg( "Could not locate GameData file %s\n", GameDataFile ); + if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "", FDGPath, sizeof( FDGPath ) ) ) + { + Msg( "Could not locate GameData file %s\n", GameDataFile ); + } } } From 137582c2b9930c48744d791418e7400b1fc3423a Mon Sep 17 00:00:00 2001 From: Alan Edwardes Date: Mon, 5 Aug 2013 15:47:51 +0100 Subject: [PATCH 2/3] Changed VBSP to check the MOD directory for FGD files specified in gameinfo.txt, in addition to EXECUTABLE_PATH. --- mp/src/utils/vbsp/map.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mp/src/utils/vbsp/map.cpp b/mp/src/utils/vbsp/map.cpp index 34219bd4..bbab291e 100644 --- a/mp/src/utils/vbsp/map.cpp +++ b/mp/src/utils/vbsp/map.cpp @@ -2003,9 +2003,12 @@ void CMapFile::CheckForInstances( const char *pszFileName ) char FDGPath[ MAX_PATH ]; if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "EXECUTABLE_PATH", FDGPath, sizeof( FDGPath ) ) ) { - if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "", FDGPath, sizeof( FDGPath ) ) ) + if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "MOD", FDGPath, sizeof( FDGPath ) ) ) { - Msg( "Could not locate GameData file %s\n", GameDataFile ); + if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "", FDGPath, sizeof( FDGPath ) ) ) + { + Msg( "Could not locate GameData file %s\n", GameDataFile ); + } } } From 0c8730284404a99c4645634bcaac20e5eb838bee Mon Sep 17 00:00:00 2001 From: Alan Edwardes Date: Mon, 5 Aug 2013 18:56:45 +0100 Subject: [PATCH 3/3] VBSP now checks all search paths for an FGD file. --- mp/src/utils/vbsp/map.cpp | 7 ++----- sp/src/utils/vbsp/map.cpp | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/mp/src/utils/vbsp/map.cpp b/mp/src/utils/vbsp/map.cpp index bbab291e..a469a198 100644 --- a/mp/src/utils/vbsp/map.cpp +++ b/mp/src/utils/vbsp/map.cpp @@ -2003,12 +2003,9 @@ void CMapFile::CheckForInstances( const char *pszFileName ) char FDGPath[ MAX_PATH ]; if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "EXECUTABLE_PATH", FDGPath, sizeof( FDGPath ) ) ) { - if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "MOD", FDGPath, sizeof( FDGPath ) ) ) + if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, NULL, FDGPath, sizeof( FDGPath ) ) ) { - if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "", FDGPath, sizeof( FDGPath ) ) ) - { - Msg( "Could not locate GameData file %s\n", GameDataFile ); - } + Msg( "Could not locate GameData file %s\n", GameDataFile ); } } diff --git a/sp/src/utils/vbsp/map.cpp b/sp/src/utils/vbsp/map.cpp index bbab291e..a469a198 100644 --- a/sp/src/utils/vbsp/map.cpp +++ b/sp/src/utils/vbsp/map.cpp @@ -2003,12 +2003,9 @@ void CMapFile::CheckForInstances( const char *pszFileName ) char FDGPath[ MAX_PATH ]; if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "EXECUTABLE_PATH", FDGPath, sizeof( FDGPath ) ) ) { - if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "MOD", FDGPath, sizeof( FDGPath ) ) ) + if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, NULL, FDGPath, sizeof( FDGPath ) ) ) { - if ( !g_pFullFileSystem->RelativePathToFullPath( GameDataFile, "", FDGPath, sizeof( FDGPath ) ) ) - { - Msg( "Could not locate GameData file %s\n", GameDataFile ); - } + Msg( "Could not locate GameData file %s\n", GameDataFile ); } }