]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
model_shared: Move skinframe struct to r_textures.h
[xonotic/darkplaces.git] / cl_main.c
index 6ded36842ef017b744ea36f72aa1de7944761c40..3f24ce7b359094df4cc767bb0cc0d0bd89b2ddb3 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -147,7 +147,7 @@ void CL_ClearState(void)
 
        // tweak these if the game runs out
        cl.max_csqcrenderentities = 0;
-       cl.max_entities = MAX_ENITIES_INITIAL;
+       cl.max_entities = MAX_ENTITIES_INITIAL;
        cl.max_static_entities = MAX_STATICENTITIES;
        cl.max_effects = MAX_EFFECTS;
        cl.max_beams = MAX_BEAMS;
@@ -430,7 +430,7 @@ This command causes the client to wait for the signon messages again.
 This is sent just before a server changes levels
 ==================
 */
-void CL_Reconnect_f(cmd_state_t *cmd)
+static void CL_Reconnect_f(cmd_state_t *cmd)
 {
        char temp[128];
        // if not connected, reconnect to the most recent server
@@ -529,9 +529,6 @@ void CL_EstablishConnection(const char *address, int firstarg)
        M_Update_Return_Reason("");
 #endif
 
-       // Disconnect from the current server, or stop a running demo.
-       CL_Disconnect();
-
        // make sure the client ports are open before attempting to connect
        NetConn_UpdateSockets();
 
@@ -575,6 +572,11 @@ static void CL_EstablishConnection_Local(void)
                CL_EstablishConnection("local:1", -2);
 }
 
+static qbool CL_Intermission(void)
+{
+       return cl.intermission;
+}
+
 /*
 ==============
 CL_PrintEntities_f
@@ -2923,6 +2925,8 @@ void CL_Init (void)
        {
                Con_Printf("Initializing client\n");
 
+               Cvar_SetValueQuick(&host_isclient, 1);
+
                R_Modules_Init();
                Palette_Init();
 #ifdef CONFIG_MENU
@@ -3056,9 +3060,6 @@ void CL_Init (void)
                CL_Video_Init();
 
                host.hook.ConnectLocal = CL_EstablishConnection_Local;
-
-               #ifdef CONFIG_MENU
-               Cbuf_InsertText(&cmd_client,"menu_start\n");
-               #endif
+               host.hook.CL_Intermission = CL_Intermission;
        }
 }