mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-10 07:11:36 +00:00
Updating ioq3 dated September 29 2015
This commit is contained in:
parent
4d326dc31c
commit
da653f697d
4 changed files with 57 additions and 12 deletions
|
@ -226,13 +226,13 @@ CURLcode qcurl_easy_setopt_warn(CURL *curl, CURLoption option, ...)
|
|||
|
||||
if(option < CURLOPTTYPE_OBJECTPOINT) {
|
||||
long longValue = va_arg(argp, long);
|
||||
result = qcurl_easy_setopt_warn(curl, option, longValue);
|
||||
result = qcurl_easy_setopt(curl, option, longValue);
|
||||
} else if(option < CURLOPTTYPE_OFF_T) {
|
||||
void *pointerValue = va_arg(argp, void *);
|
||||
result = qcurl_easy_setopt_warn(curl, option, pointerValue);
|
||||
result = qcurl_easy_setopt(curl, option, pointerValue);
|
||||
} else {
|
||||
curl_off_t offsetValue = va_arg(argp, curl_off_t);
|
||||
result = qcurl_easy_setopt_warn(curl, option, offsetValue);
|
||||
result = qcurl_easy_setopt(curl, option, offsetValue);
|
||||
}
|
||||
|
||||
if(result != CURLE_OK) {
|
||||
|
|
|
@ -2502,6 +2502,8 @@ int FS_GetModList( char *listbuf, int bufsize ) {
|
|||
int dummy;
|
||||
char **pFiles0 = NULL;
|
||||
char **pFiles1 = NULL;
|
||||
char **pFiles2 = NULL;
|
||||
char **pFiles3 = NULL;
|
||||
qboolean bDrop = qfalse;
|
||||
|
||||
*listbuf = 0;
|
||||
|
@ -2509,9 +2511,12 @@ int FS_GetModList( char *listbuf, int bufsize ) {
|
|||
|
||||
pFiles0 = Sys_ListFiles( fs_homepath->string, NULL, NULL, &dummy, qtrue );
|
||||
pFiles1 = Sys_ListFiles( fs_basepath->string, NULL, NULL, &dummy, qtrue );
|
||||
pFiles2 = Sys_ListFiles( fs_steampath->string, NULL, NULL, &dummy, qtrue );
|
||||
// we searched for mods in the three paths
|
||||
// it is likely that we have duplicate names now, which we will cleanup below
|
||||
pFiles = Sys_ConcatenateFileLists( pFiles0, pFiles1 );
|
||||
pFiles3 = Sys_ConcatenateFileLists( pFiles0, pFiles1 );
|
||||
pFiles = Sys_ConcatenateFileLists( pFiles2, pFiles3 );
|
||||
|
||||
nPotential = Sys_CountFileList(pFiles);
|
||||
|
||||
for ( i = 0 ; i < nPotential ; i++ ) {
|
||||
|
@ -2553,6 +2558,15 @@ int FS_GetModList( char *listbuf, int bufsize ) {
|
|||
Sys_FreeFileList( pPaks );
|
||||
}
|
||||
|
||||
/* try on steam path */
|
||||
if ( nPaks <= 0 )
|
||||
{
|
||||
path = FS_BuildOSPath( fs_steampath->string, name, "" );
|
||||
nPaks = 0;
|
||||
pPaks = Sys_ListFiles( path, ".pk3", NULL, &nPaks, qfalse );
|
||||
Sys_FreeFileList( pPaks );
|
||||
}
|
||||
|
||||
if (nPaks > 0) {
|
||||
nLen = strlen(name) + 1;
|
||||
// nLen is the length of the mod path
|
||||
|
@ -3320,6 +3334,9 @@ static void FS_Startup( const char *gameName )
|
|||
|
||||
// check for additional base game so mods can be based upon other mods
|
||||
if ( fs_basegame->string[0] && Q_stricmp( fs_basegame->string, gameName ) ) {
|
||||
if (fs_steampath->string[0]) {
|
||||
FS_AddGameDirectory(fs_steampath->string, fs_basegame->string);
|
||||
}
|
||||
if (fs_basepath->string[0]) {
|
||||
FS_AddGameDirectory(fs_basepath->string, fs_basegame->string);
|
||||
}
|
||||
|
@ -3330,6 +3347,9 @@ static void FS_Startup( const char *gameName )
|
|||
|
||||
// check for additional game folder for mods
|
||||
if ( fs_gamedirvar->string[0] && Q_stricmp( fs_gamedirvar->string, gameName ) ) {
|
||||
if (fs_steampath->string[0]) {
|
||||
FS_AddGameDirectory(fs_steampath->string, fs_gamedirvar->string);
|
||||
}
|
||||
if (fs_basepath->string[0]) {
|
||||
FS_AddGameDirectory(fs_basepath->string, fs_gamedirvar->string);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define HOMEPATH_NAME_WIN "Reaction"
|
||||
#define HOMEPATH_NAME_MACOSX HOMEPATH_NAME_WIN
|
||||
// #define STEAMPATH_NAME "Foo Bar"
|
||||
// #define STEAMPATH_APPID ""
|
||||
#define GAMENAME_FOR_MASTER "Reaction"
|
||||
// #define LEGACY_PROTOCOL // You probably don't need this for your standalone game
|
||||
#else
|
||||
|
@ -46,6 +47,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define HOMEPATH_NAME_WIN "Reaction"
|
||||
#define HOMEPATH_NAME_MACOSX HOMEPATH_NAME_WIN
|
||||
// #define STEAMPATH_NAME "Foo Bar"
|
||||
// #define STEAMPATH_APPID ""
|
||||
#define GAMENAME_FOR_MASTER "Reaction"
|
||||
// #define LEGACY_PROTOCOL
|
||||
#endif
|
||||
|
|
|
@ -136,26 +136,49 @@ Sys_SteamPath
|
|||
*/
|
||||
char *Sys_SteamPath( void )
|
||||
{
|
||||
#ifdef STEAMPATH_NAME
|
||||
#if defined(STEAMPATH_NAME) || defined(STEAMPATH_APPID)
|
||||
HKEY steamRegKey;
|
||||
DWORD pathLen = MAX_OSPATH;
|
||||
qboolean finishPath = qfalse;
|
||||
|
||||
if (!RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, &steamRegKey))
|
||||
#ifdef STEAMPATH_APPID
|
||||
if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App " STEAMPATH_APPID, 0, KEY_QUERY_VALUE, &steamRegKey))
|
||||
{
|
||||
DWORD pathLen = MAX_OSPATH;
|
||||
pathLen = MAX_OSPATH;
|
||||
if (RegQueryValueEx(steamRegKey, "InstallLocation", NULL, NULL, (LPBYTE)steamPath, &pathLen))
|
||||
steamPath[0] = '\0';
|
||||
}
|
||||
|
||||
if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App " STEAMPATH_APPID, 0, KEY_QUERY_VALUE, &steamRegKey))
|
||||
{
|
||||
pathLen = MAX_OSPATH;
|
||||
if (RegQueryValueEx(steamRegKey, "InstallLocation", NULL, NULL, (LPBYTE)steamPath, &pathLen))
|
||||
steamPath[0] = '\0';
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef STEAMPATH_NAME
|
||||
if (!steamPath[0] && !RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, &steamRegKey))
|
||||
{
|
||||
pathLen = MAX_OSPATH;
|
||||
if (RegQueryValueEx(steamRegKey, "SteamPath", NULL, NULL, (LPBYTE)steamPath, &pathLen))
|
||||
if (RegQueryValueEx(steamRegKey, "InstallPath", NULL, NULL, (LPBYTE)steamPath, &pathLen))
|
||||
steamPath[0] = '\0';
|
||||
|
||||
if (steamPath[0])
|
||||
{
|
||||
if (pathLen == MAX_OSPATH)
|
||||
pathLen--;
|
||||
finishPath = qtrue;
|
||||
}
|
||||
#endif
|
||||
|
||||
steamPath[pathLen] = '\0';
|
||||
if (steamPath[0])
|
||||
{
|
||||
if (pathLen == MAX_OSPATH)
|
||||
pathLen--;
|
||||
|
||||
steamPath[pathLen] = '\0';
|
||||
|
||||
if (finishPath)
|
||||
Q_strcat(steamPath, MAX_OSPATH, "\\SteamApps\\common\\" STEAMPATH_NAME );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue