From 555eaebb1b7cb7c4a5e1036892b0effbd62766ae Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 21 Jun 2011 11:18:35 +0000 Subject: - 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() --- src/client/cl_ui.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client/cl_ui.c') diff --git a/src/client/cl_ui.c b/src/client/cl_ui.c index 8ee5d1b4..faa1237a 100644 --- a/src/client/cl_ui.c +++ b/src/client/cl_ui.c @@ -32,8 +32,8 @@ GetClientState */ static void GetClientState( uiClientState_t *state ) { state->connectPacketCount = clc.connectPacketCount; - state->connState = cls.state; - Q_strncpyz( state->servername, cls.servername, sizeof( state->servername ) ); + state->connState = clc.state; + Q_strncpyz( state->servername, clc.servername, sizeof( state->servername ) ); Q_strncpyz( state->updateInfoString, cls.updateInfoString, sizeof( state->updateInfoString ) ); Q_strncpyz( state->messageString, clc.serverMessage, sizeof( state->messageString ) ); state->clientNum = cl.snap.ps.clientNum; @@ -1103,7 +1103,7 @@ void CL_InitUI( void ) { v = VM_Call( uivm, UI_GETAPIVERSION ); if (v == UI_OLD_API_VERSION) { // init for this gamestate - VM_Call( uivm, UI_INIT, (cls.state >= CA_AUTHORIZING && cls.state < CA_ACTIVE)); + VM_Call( uivm, UI_INIT, (clc.state >= CA_AUTHORIZING && clc.state < CA_ACTIVE)); } else if (v != UI_API_VERSION) { Com_Error( ERR_DROP, "User Interface is version %d, expected %d", v, UI_API_VERSION ); @@ -1111,7 +1111,7 @@ void CL_InitUI( void ) { } else { // init for this gamestate - VM_Call( uivm, UI_INIT, (cls.state >= CA_AUTHORIZING && cls.state < CA_ACTIVE) ); + VM_Call( uivm, UI_INIT, (clc.state >= CA_AUTHORIZING && clc.state < CA_ACTIVE) ); // show where the ui folder was loaded from Cmd_ExecuteString( "which ui/\n" ); -- cgit