diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-06-21 11:18:35 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 21:47:33 +0000 |
commit | 555eaebb1b7cb7c4a5e1036892b0effbd62766ae (patch) | |
tree | 1038802c3629c85c47a62a5013f2a7271d485bec /src/client/cl_cin.c | |
parent | e09392335162f87cd16257506e600268c2cd8ec9 (diff) |
- Improve game_restart: * differing screen resolutions and network settings are now honoured when changing fs_game * Fix hunk memory leak on game_restart * Move cls.state and cls.servername to clc so connection state is fully preserved over game_restart * Revert back to previous fs_game after disconnecting from a server that triggered a game_restart * Fix error dialog popping up after every game_restart if an error happened previously (reported by Ensiform) - Fixed that not all commands added by CL_Init() would be removed by CL_Shutdown()
Diffstat (limited to 'src/client/cl_cin.c')
-rw-r--r-- | src/client/cl_cin.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/client/cl_cin.c b/src/client/cl_cin.c index 213b7a40..3793dcd9 100644 --- a/src/client/cl_cin.c +++ b/src/client/cl_cin.c @@ -1264,6 +1264,8 @@ static void RoQ_init( void ) ******************************************************************************/ static void RoQShutdown( void ) { + const char *s; + if (!cinTable[currentHandle].buf) { return; } @@ -1280,7 +1282,16 @@ static void RoQShutdown( void ) { } if (cinTable[currentHandle].alterGameState) { - cls.state = CA_DISCONNECTED; + clc.state = CA_DISCONNECTED; + // we can't just do a vstr nextmap, because + // if we are aborting the intro cinematic with + // a devmap command, nextmap would be valid by + // the time it was referenced + s = Cvar_VariableString( "nextmap" ); + if ( s[0] ) { + Cbuf_ExecuteText( EXEC_APPEND, va("%s\n", s) ); + Cvar_Set( "nextmap", "" ); + } CL_handle = -1; } cinTable[currentHandle].fileName[0] = 0; @@ -1304,7 +1315,7 @@ e_status CIN_StopCinematic(int handle) { } if (cinTable[currentHandle].alterGameState) { - if ( cls.state != CA_CINEMATIC ) { + if ( clc.state != CA_CINEMATIC ) { return cinTable[currentHandle].status; } } @@ -1345,7 +1356,7 @@ e_status CIN_RunCinematic (int handle) currentHandle = handle; if (cinTable[currentHandle].alterGameState) { - if ( cls.state != CA_CINEMATIC ) { + if ( clc.state != CA_CINEMATIC ) { return cinTable[currentHandle].status; } } @@ -1469,7 +1480,7 @@ int CIN_PlayCinematic( const char *arg, int x, int y, int w, int h, int systemBi Com_DPrintf("trFMV::play(), playing %s\n", arg); if (cinTable[currentHandle].alterGameState) { - cls.state = CA_CINEMATIC; + clc.state = CA_CINEMATIC; } Con_Close(); @@ -1604,7 +1615,7 @@ void CL_PlayCinematic_f(void) { int bits = CIN_system; Com_DPrintf("CL_PlayCinematic_f\n"); - if (cls.state == CA_CINEMATIC) { + if (clc.state == CA_CINEMATIC) { SCR_StopCinematic(); } |