Fixed auto-update server

Fixed auto-update server

diff --git a/src/engine/client/cl_cin.cpp b/src/engine/client/cl_cin.cpp
index 8e08061..c55324d 100644
--- a/src/engine/client/cl_cin.cpp
+++ b/src/engine/client/cl_cin.cpp
@@ -1686,6 +1686,12 @@ void CL_PlayCinematic_f( void )
     valueType*    arg, *s;
     sint bits = CIN_system;
     
+    // don't allow this while on server
+    if( cls.state > CA_DISCONNECTED && cls.state <= CA_ACTIVE )
+    {
+        return;
+    }
+    
     Com_DPrintf( "CL_PlayCinematic_f\n" );
     if( cls.state == CA_CINEMATIC )
     {
diff --git a/src/engine/client/cl_console.cpp b/src/engine/client/cl_console.cpp
index 4ba7c3c..f27c227 100644
--- a/src/engine/client/cl_console.cpp
+++ b/src/engine/client/cl_console.cpp
@@ -1021,31 +1021,34 @@ void Con_DrawSolidConsole( float32 frac )
     color[3] = frac * 2.0f;
     renderSystem->SetColor( color );
     
-    i = strlen( Q3_VERSION );
-    totalwidth = idClientScreenSystemLocal::ConsoleFontStringWidth( Q3_VERSION, i ) + cl_conXOffset->integer;
+    // version string
+    i = strlen( PRODUCT_VERSION );
+    totalwidth = idClientScreenSystemLocal::ConsoleFontStringWidth( PRODUCT_VERSION, i ) + cl_conXOffset->integer;
     totalwidth += 30;
     
     for( x = 0 ; x < i ; x++ )
     {
-        idClientScreenSystemLocal::DrawConsoleFontChar( cls.glconfig.vidWidth - totalwidth + currentWidthLocation, lines - idClientScreenSystemLocal::ConsoleFontCharHeight() * 2, Q3_VERSION[x] );
-        currentWidthLocation += idClientScreenSystemLocal::ConsoleFontCharWidth( Q3_VERSION[x] );
+        idClientScreenSystemLocal::DrawConsoleFontChar( cls.glconfig.vidWidth - totalwidth + currentWidthLocation, lines - idClientScreenSystemLocal::ConsoleFontCharHeight() * 2, PRODUCT_VERSION[x] );
+        currentWidthLocation += idClientScreenSystemLocal::ConsoleFontCharWidth( PRODUCT_VERSION[x] );
     }
     
     // engine string
-    i = strlen( Q3_ENGINE );
-    totalwidth = idClientScreenSystemLocal::ConsoleFontStringWidth( Q3_ENGINE, i ) + cl_conXOffset->integer;
+    i = strlen( ENGINE_NAME );
+    totalwidth = idClientScreenSystemLocal::ConsoleFontStringWidth( ENGINE_NAME, i ) + cl_conXOffset->integer;
     totalwidth += 30;
     
     currentWidthLocation = 0;
     for( x = 0 ; x < i ; x++ )
     {
-        idClientScreenSystemLocal::DrawConsoleFontChar( cls.glconfig.vidWidth - totalwidth + currentWidthLocation, lines - idClientScreenSystemLocal::ConsoleFontCharHeight(), Q3_ENGINE[x] );
-        currentWidthLocation += idClientScreenSystemLocal::ConsoleFontCharWidth( Q3_ENGINE[x] );
+        idClientScreenSystemLocal::DrawConsoleFontChar( cls.glconfig.vidWidth - totalwidth + currentWidthLocation, lines - idClientScreenSystemLocal::ConsoleFontCharHeight(), ENGINE_NAME[x] );
+        currentWidthLocation += idClientScreenSystemLocal::ConsoleFontCharWidth( ENGINE_NAME[x] );
     }
     
     // draw the text
     con.vislines = lines;
-    rows = ( lines ) / idClientScreenSystemLocal::ConsoleFontCharHeight() - 3;		// rows of text to draw
+    
+    // rows of text to draw
+    rows = ( lines ) / idClientScreenSystemLocal::ConsoleFontCharHeight() - 3;
     rows++;
     
     y = lines - ( idClientScreenSystemLocal::ConsoleFontCharHeight() * 3 ) + 10;
diff --git a/src/engine/client/cl_main.cpp b/src/engine/client/cl_main.cpp
index 89c5dbd..8ee8731 100644
--- a/src/engine/client/cl_main.cpp
+++ b/src/engine/client/cl_main.cpp
@@ -1052,13 +1052,6 @@ memory on the hunk from cgame, ui, and renderer
 */
 void CL_MapLoading( void )
 {
-    if( com_dedicated->integer )
-    {
-        cls.state = CA_DISCONNECTED;
-        clientGUISystem->SetCatcher( KEYCATCH_CONSOLE );
-        return;
-    }
-    
     if( !com_cl_running->integer )
     {
         return;
@@ -1163,6 +1156,9 @@ void CL_Disconnect( bool showMainMenu, pointer reason )
         return;
     }
     
+    // shutting down the client so enter full screen ui mode
+    cvarSystem->Set( "r_uiFullScreen", "1" );
+    
     if( clc.demorecording )
     {
         CL_StopRecord_f();
@@ -1229,8 +1225,6 @@ void CL_Disconnect( bool showMainMenu, pointer reason )
         CL_ClearStaticDownload();
     }
     
-    cls.state = CA_DISCONNECTED;
-    
     // allow cheats locally
     //cvarSystem->Set( "sv_cheats", "1" );
     
@@ -1868,10 +1862,13 @@ void CL_Vid_Restart_f( void )
     cls.soundRegistered = false;
     autoupdateChecked = false;
     
+    // unpause so the cgame definately gets a snapshot and renders a frame
+    cvarSystem->Set( "cl_paused", "0" );
+    
     // if not running a server clear the whole hunk
     if( !com_sv_running->integer )
     {
-        collisionModelManager->ClearMap();
+        //collisionModelManager->ClearMap();
         // clear the whole hunk
         Hunk_Clear();
     }
@@ -1891,9 +1888,6 @@ void CL_Vid_Restart_f( void )
     idsystem->Restart_f();
 #endif
     
-    // unpause so the cgame definately gets a snapshot and renders a frame
-    cvarSystem->Set( "cl_paused", "0" );
-    
     // start the cgame if connected
     if( cls.state > CA_CONNECTED && cls.state != CA_CINEMATIC )
     {
@@ -2986,7 +2980,7 @@ CL_CheckUserinfo
 void CL_CheckUserinfo( void )
 {
     // don't add reliable commands when not yet connected
-    if( cls.state < CA_CONNECTED )
+    if( cls.state < CA_CHALLENGING )
     {
         return;
     }
@@ -3140,8 +3134,6 @@ void CL_Frame( sint msec )
 {
     if( !com_cl_running->integer )
     {
-        soundSystem->Update();
-        clientScreenSystem->UpdateScreen();
         return;
     }
     
diff --git a/src/engine/client/clientParse.cpp b/src/engine/client/clientParse.cpp
index 76149b7..dc46b9d 100644
--- a/src/engine/client/clientParse.cpp
+++ b/src/engine/client/clientParse.cpp
@@ -931,6 +931,14 @@ void idClientParseSystemLocal::ParseDownload( msg_t* msg )
     if( !clc.download )
     {
         clc.download = fileSystem->SV_FOpenFileWrite( cls.downloadTempName );
+        
+        if( !clc.download )
+        {
+            Com_Printf( "Could not create %s\n", cls.downloadTempName );
+            CL_AddReliableCommand( "stopdl" );
+            CL_NextDownload();
+            return;
+        }
     }
     
     if( size )
diff --git a/src/engine/client/clientScreen.cpp b/src/engine/client/clientScreen.cpp
index 14aaefe..1075c51 100644
--- a/src/engine/client/clientScreen.cpp
+++ b/src/engine/client/clientScreen.cpp
@@ -555,17 +555,14 @@ void idClientScreenSystemLocal::DrawScreenField( stereoFrame_t stereoFrame )
                 }
             case CA_LOADING:
             case CA_PRIMED:
+                // draw the game information screen and loading progress
+                clientGameSystem->CGameRendering( stereoFrame );
+                
                 // also draw the connection information, so it doesn't
                 // flash away too briefly on local or lan games
                 //if (!com_sv_running->value || cvarSystem->VariableIntegerValue("sv_cheats"))	// Ridah, don't draw useless text if not in dev mode
                 uiManager->Refresh( cls.realtime );
                 uiManager->DrawConnectScreen( true );
-                // draw the game information screen and loading progress
-                if( cgvm )
-                {
-                    clientGameSystem->CGameRendering( stereoFrame );
-                }
-                
                 break;
             case CA_ACTIVE:
                 clientGameSystem->CGameRendering( stereoFrame );
diff --git a/src/engine/download/downloadMain.cpp b/src/engine/download/downloadMain.cpp
index 0629570..9189cca 100644
--- a/src/engine/download/downloadMain.cpp
+++ b/src/engine/download/downloadMain.cpp
@@ -107,7 +107,6 @@ idDownloadSystemLocal::InitDownload
 */
 void idDownloadSystemLocal::InitDownload( void )
 {
-#ifndef DEDICATED
     if( dl_initialized )
     {
         return;
@@ -120,7 +119,6 @@ void idDownloadSystemLocal::InitDownload( void )
     
     Com_Printf( "Client download subsystem initialized\n" );
     dl_initialized = 1;

[... diff too long, it was truncated ...]

GitHub
sha: 6eb75b5a