mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 06:42:26 +00:00
remove the hardcoding of qw from all but the default server gamedir. This
should take care of skin downloads when using --with-newstyle
This commit is contained in:
parent
45c62d5923
commit
186bec3342
5 changed files with 18 additions and 11 deletions
|
@ -28,6 +28,9 @@
|
|||
/* Define this to the base game for the engine to load */
|
||||
#undef BASEGAME
|
||||
|
||||
/* Define this to the base directory for the client to download skins to */
|
||||
#undef SKINBASE
|
||||
|
||||
/* Define this to use experimental code */
|
||||
#undef _EXPERIMENTAL_
|
||||
|
||||
|
|
|
@ -937,6 +937,7 @@ if test "x$newstyle" = xyes -o "x$newstyle" = "x"; then
|
|||
AC_MSG_RESULT([new style])
|
||||
AC_DEFINE(NEWSTYLE)
|
||||
AC_DEFINE(BASEGAME, "base")
|
||||
AC_DEFINE(SKINBASE, "base")
|
||||
default_globalconf="/etc/$PACKAGE.conf"
|
||||
eval foo="$datadir"
|
||||
default_sharepath="$foo/games/$PACKAGE"
|
||||
|
@ -944,6 +945,7 @@ if test "x$newstyle" = xyes -o "x$newstyle" = "x"; then
|
|||
else
|
||||
AC_MSG_RESULT([old style (id Software defaults)])
|
||||
AC_DEFINE(BASEGAME, "id1")
|
||||
AC_DEFINE(SKINBASE, "qw")
|
||||
if test "x$SYSTYPE" = xWIN32; then
|
||||
default_globalconf="%WINDIR%/$PACKAGE.conf"
|
||||
else
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
extern cvar_t *fs_userpath;
|
||||
extern cvar_t *fs_sharepath;
|
||||
extern cvar_t *fs_skinbase;
|
||||
|
||||
extern int com_filesize;
|
||||
struct cache_user_s;
|
||||
|
|
|
@ -448,8 +448,8 @@ CL_ParseDownload (void)
|
|||
snprintf (name, sizeof (name), "%s/%s", com_gamedir,
|
||||
cls.downloadtempname);
|
||||
else
|
||||
snprintf (name, sizeof (name), "%s/qw/%s", fs_userpath->string,
|
||||
cls.downloadtempname);
|
||||
snprintf (name, sizeof (name), "%s/%s/%s", fs_userpath->string,
|
||||
fs_skinbase->string, cls.downloadtempname);
|
||||
|
||||
COM_CreatePath (name);
|
||||
|
||||
|
@ -501,10 +501,10 @@ CL_ParseDownload (void)
|
|||
snprintf (newn, sizeof (newn), "%s/%s", com_gamedir,
|
||||
cls.downloadname);
|
||||
} else {
|
||||
snprintf (oldn, sizeof (oldn), "%s/qw/%s", fs_userpath->string,
|
||||
cls.downloadtempname);
|
||||
snprintf (newn, sizeof (newn), "%s/qw/%s", fs_userpath->string,
|
||||
cls.downloadname);
|
||||
snprintf (oldn, sizeof (oldn), "%s/%s/%s", fs_userpath->string,
|
||||
fs_skinbase->string, cls.downloadtempname);
|
||||
snprintf (newn, sizeof (newn), "%s/%s/%s", fs_userpath->string,
|
||||
fs_skinbase->string, cls.downloadname);
|
||||
}
|
||||
r = Qrename (oldn, newn);
|
||||
if (r)
|
||||
|
|
|
@ -121,6 +121,7 @@ char gamedirfile[MAX_OSPATH];
|
|||
cvar_t *fs_userpath;
|
||||
cvar_t *fs_sharepath;
|
||||
cvar_t *fs_basegame;
|
||||
cvar_t *fs_skinbase;
|
||||
|
||||
int com_filesize;
|
||||
|
||||
|
@ -984,9 +985,7 @@ COM_Gamedir (char *dir)
|
|||
//
|
||||
Cache_Flush ();
|
||||
|
||||
if (strcmp (dir, fs_basegame->string) == 0)
|
||||
return;
|
||||
if (strcmp (dir, "qw") == 0 && strcmp (fs_basegame->string, "id1") == 0)
|
||||
if (strcmp (dir, fs_skinbase->string) == 0)
|
||||
return;
|
||||
|
||||
COM_AddGameDirectory (dir);
|
||||
|
@ -1056,8 +1055,8 @@ COM_Filesystem_Init (void)
|
|||
COM_CreateGameDirectory (fs_basegame->string);
|
||||
|
||||
// If we're dealing with id1, use qw too
|
||||
if (stricmp (fs_basegame->string, "id1") == 0) {
|
||||
COM_CreateGameDirectory ("qw");
|
||||
if (!strequal (fs_basegame->string, fs_skinbase->string) == 0) {
|
||||
COM_CreateGameDirectory (fs_skinbase->string);
|
||||
}
|
||||
|
||||
if ((i = COM_CheckParm ("-game")) && i < com_argc - 1) {
|
||||
|
@ -1085,6 +1084,8 @@ COM_Filesystem_Init_Cvars (void)
|
|||
"location of your game directories");
|
||||
fs_basegame = Cvar_Get ("fs_basegame", BASEGAME, CVAR_ROM,
|
||||
"game to use by default");
|
||||
fs_skinbase= Cvar_Get ("fs_skinbase", SKINBASE, CVAR_ROM,
|
||||
"location of skins dir for downloads");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue