diff --git a/NEWS b/NEWS index 6d9c165..60f1168 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,16 @@ NEWS for the QuakeForge project ------------------------------- +22 Jan 2000 - changes to command line option -game + You may now specify multiple game directories with -game. If for + example you wanted to use the original registered game with MegaTF + on a new style binary you would use -game id1,megatf. It does work + with traditional style binaries and you may specify as many dirs as + you like seperated by commas. + + One caveat: Most mods were designed to be the only one in use, it + may be a Bad Thing to mix certain mods with other mods. + 19 Jan 2000 - changes to cvar r_fog Fog color is once again white. The r_fog cvar is now a control for the fog density rather than a simple toggle control. Eric Windisch diff --git a/uquake/common.c b/uquake/common.c index d7ca99f..4dc9868 100644 --- a/uquake/common.c +++ b/uquake/common.c @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // common.c -- misc functions used in client and server #include "quakedef.h" +#include #define NUM_SAFE_ARGVS 7 @@ -1651,9 +1652,11 @@ COM_InitFilesystem */ void COM_InitFilesystem (void) { - int i, j; - char basedir[MAX_OSPATH]; - searchpath_t *search; + int i, j, len; + char basedir[MAX_OSPATH]; + searchpath_t *search; + char * p; + char * games; // // -basedir @@ -1709,7 +1712,20 @@ void COM_InitFilesystem (void) if (i && i < com_argc-1) { com_modified = true; - COM_AddGameDirectory (va("%s/%s", basedir, com_argv[i+1])); + + len = strlen(com_argv[i+1]) + 1; + games = (char *)malloc(len); + strcpy(games, com_argv[i+1]); + + for (p = strtok(games, ","); + p != NULL; + p = strtok(NULL, ",")) { + COM_AddGameDirectory (va("%s/%s", basedir, p)); + } + + free(games); + +// COM_AddGameDirectory (va("%s/%s", basedir, com_argv[i+1])); } //