mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
fix nq's gamedir handling for the -hipnotic etc shortcuts
This commit is contained in:
parent
31db390df5
commit
b5a960c57b
3 changed files with 7 additions and 17 deletions
|
@ -93,6 +93,5 @@ void QFS_LoadCacheFile (const char *path, struct cache_user_s *cu);
|
||||||
void QFS_CreatePath (const char *path);
|
void QFS_CreatePath (const char *path);
|
||||||
void QFS_Gamedir (const char *dir);
|
void QFS_Gamedir (const char *dir);
|
||||||
void QFS_Init (const char *game);
|
void QFS_Init (const char *game);
|
||||||
void QFS_CreateGameDirectory (const char *gamename);
|
|
||||||
|
|
||||||
#endif // __quakefs_h
|
#endif // __quakefs_h
|
||||||
|
|
|
@ -1129,14 +1129,6 @@ QFS_Gamedir (const char *dir)
|
||||||
Cache_Flush ();
|
Cache_Flush ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
QFS_CreateGameDirectory (const char *gamename)
|
|
||||||
{
|
|
||||||
if (strcmp (fs_userpath->string, "."))
|
|
||||||
QFS_CreatePath (va ("%s/%s/dummy", fs_userpath->string, gamename));
|
|
||||||
QFS_AddGameDirectory (gamename);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
QFS_Init (const char *game)
|
QFS_Init (const char *game)
|
||||||
{
|
{
|
||||||
|
@ -1267,7 +1259,7 @@ QFS_WOpen (const char *path, int zip)
|
||||||
char mode[4] = "wb\000\000";
|
char mode[4] = "wb\000\000";
|
||||||
|
|
||||||
if (zip)
|
if (zip)
|
||||||
mode[2] = bound (1, zip, 9);
|
mode[2] = bound (1, zip, 9) + '0';
|
||||||
dsprintf (full_path, "%s/%s", fs_userpath->string, path);
|
dsprintf (full_path, "%s/%s", fs_userpath->string, path);
|
||||||
QFS_CreatePath (full_path->str);
|
QFS_CreatePath (full_path->str);
|
||||||
file = Qopen (full_path->str, mode);
|
file = Qopen (full_path->str, mode);
|
||||||
|
|
|
@ -46,18 +46,17 @@ Game_Init (void)
|
||||||
|
|
||||||
// FIXME: make this dependant on QF metadata in the mission packs
|
// FIXME: make this dependant on QF metadata in the mission packs
|
||||||
standard_quake = true;
|
standard_quake = true;
|
||||||
|
|
||||||
if ((i = COM_CheckParm ("-hipnotic"))) {
|
if ((i = COM_CheckParm ("-hipnotic"))) {
|
||||||
QFS_CreateGameDirectory ("hipnotic");
|
QFS_Gamedir ("hipnotic");
|
||||||
standard_quake = false;
|
standard_quake = false;
|
||||||
hipnotic = true;
|
hipnotic = true;
|
||||||
}
|
} else if ((i = COM_CheckParm ("-rogue"))) {
|
||||||
if ((i = COM_CheckParm ("-rogue"))) {
|
QFS_Gamedir ("rogue");
|
||||||
QFS_CreateGameDirectory ("rogue");
|
|
||||||
standard_quake = false;
|
standard_quake = false;
|
||||||
rogue = true;
|
rogue = true;
|
||||||
}
|
} else if ((i = COM_CheckParm ("-abyss"))) {
|
||||||
if ((i = COM_CheckParm ("-abyss"))) {
|
QFS_Gamedir ("abyss");
|
||||||
QFS_CreateGameDirectory ("abyss");
|
|
||||||
abyss = true;
|
abyss = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue