mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 16:41:31 +00:00
Fix restoring old fs_game upon leaving a server. Patch by Ensiform.
This commit is contained in:
parent
17ee96e6c8
commit
016b74b633
3 changed files with 14 additions and 10 deletions
|
@ -125,6 +125,9 @@ clientConnection_t clc;
|
|||
clientStatic_t cls;
|
||||
vm_t *cgvm;
|
||||
|
||||
char cl_oldGame[MAX_QPATH];
|
||||
qboolean cl_oldGameSet;
|
||||
|
||||
// Structure containing functions exported from refresh DLL
|
||||
refexport_t re;
|
||||
#ifdef USE_RENDERER_DLOPEN
|
||||
|
@ -1362,11 +1365,11 @@ static void CL_UpdateGUID( const char *prefix, int prefix_len )
|
|||
|
||||
static void CL_OldGame(void)
|
||||
{
|
||||
if(cls.oldGameSet)
|
||||
if(cl_oldGameSet)
|
||||
{
|
||||
// change back to previous fs_game
|
||||
cls.oldGameSet = qfalse;
|
||||
Cvar_Set2("fs_game", cls.oldGame, qtrue);
|
||||
cl_oldGameSet = qfalse;
|
||||
Cvar_Set2("fs_game", cl_oldGame, qtrue);
|
||||
FS_ConditionalRestart(clc.checksumFeed, qfalse);
|
||||
}
|
||||
}
|
||||
|
@ -3437,7 +3440,7 @@ void CL_Init( void ) {
|
|||
{
|
||||
CL_ClearState();
|
||||
clc.state = CA_DISCONNECTED; // no longer CA_UNINITIALIZED
|
||||
cls.oldGameSet = qfalse;
|
||||
cl_oldGameSet = qfalse;
|
||||
}
|
||||
|
||||
cls.realtime = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue