mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-21 03:01:15 +00:00
Fix registered game detection.
registered detection needs qfs to be initted, but qfs needs game to be inited... so move the qfs init into game init before the registered check.
This commit is contained in:
parent
d9ab3a1f54
commit
cb9a30e949
3 changed files with 14 additions and 16 deletions
|
@ -165,6 +165,6 @@ extern qboolean isDedicated;
|
|||
extern qboolean standard_quake;
|
||||
extern struct cvar_s *registered;
|
||||
|
||||
const char *Game_Init (void);
|
||||
void Game_Init (void);
|
||||
|
||||
#endif // __game_h
|
||||
|
|
|
@ -74,28 +74,29 @@ Game_CheckRegistered (void)
|
|||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
void
|
||||
Game_Init (void)
|
||||
{
|
||||
int i;
|
||||
registered = Cvar_Get ("registered", "0", CVAR_NONE, NULL,
|
||||
"Is the game the registered version. 1 yes 0 no");
|
||||
cmdline = Cvar_Get ("cmdline", "0", CVAR_SERVERINFO, Cvar_Info, "None");
|
||||
|
||||
Game_CheckRegistered ();
|
||||
int i;
|
||||
const char *game = "nq";
|
||||
|
||||
// FIXME: make this dependant on QF metadata in the mission packs
|
||||
standard_quake = true;
|
||||
|
||||
if ((i = COM_CheckParm ("-hipnotic"))) {
|
||||
standard_quake = false;
|
||||
return "hipnotic";
|
||||
game = "hipnotic";
|
||||
} else if ((i = COM_CheckParm ("-rogue"))) {
|
||||
standard_quake = false;
|
||||
return "rogue";
|
||||
game = "rogue";
|
||||
} else if ((i = COM_CheckParm ("-abyss"))) {
|
||||
return "abyss";
|
||||
game = "abyss";
|
||||
}
|
||||
QFS_Init (game);
|
||||
|
||||
return "nq";
|
||||
registered = Cvar_Get ("registered", "0", CVAR_NONE, NULL,
|
||||
"Is the game the registered version. 1 yes 0 no");
|
||||
cmdline = Cvar_Get ("cmdline", "0", CVAR_SERVERINFO, Cvar_Info, "None");
|
||||
|
||||
Game_CheckRegistered ();
|
||||
}
|
||||
|
|
|
@ -888,8 +888,6 @@ CL_Init_Memory (void)
|
|||
void
|
||||
Host_Init (void)
|
||||
{
|
||||
const char *mp;
|
||||
|
||||
Sys_Printf ("Host_Init\n");
|
||||
|
||||
host_cbuf = Cbuf_New (&id_interp);
|
||||
|
@ -901,8 +899,7 @@ Host_Init (void)
|
|||
|
||||
CL_Init_Memory ();
|
||||
|
||||
mp = Game_Init ();
|
||||
QFS_Init (mp);
|
||||
Game_Init ();
|
||||
PI_Init ();
|
||||
|
||||
Chase_Init_Cvars ();
|
||||
|
|
Loading…
Reference in a new issue