]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
shuffled around some SCR_BeginLoadingPlaque calls so now SV_SpawnServer causes a...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 13 Jan 2005 06:36:57 +0000 (06:36 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 13 Jan 2005 06:36:57 +0000 (06:36 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4926 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
host_cmd.c
sv_main.c

index 9989bc3c8a5ce45ea420422171d565dd5537b58e..101dee0fb603dcb9aacdeac8d99970cae53b0b5a 100644 (file)
@@ -354,7 +354,7 @@ void CL_ParseServerInfo (void)
        cl.maxclients = MSG_ReadByte ();
        if (cl.maxclients < 1 || cl.maxclients > MAX_SCOREBOARD)
        {
-               Con_Printf("Bad maxclients (%u) from server\n", cl.maxclients);
+               Host_Error("Bad maxclients (%u) from server\n", cl.maxclients);
                return;
        }
        Mem_EmptyPool(cl_scores_mempool);
@@ -374,6 +374,11 @@ void CL_ParseServerInfo (void)
        // check memory integrity
        Mem_CheckSentinelsGlobal();
 
+       S_StopAllSounds();
+       // if server is active, we already began a loading plaque
+       if (!sv.active)
+               SCR_BeginLoadingPlaque();
+
        // disable until we get textures for it
        R_ResetSkyBox();
 
index 1e67a8db3c237eb11225cd1198826b3d3a4dfd0f..0ab60c24e8490e0beeefe64a1e9926a26e948c01 100644 (file)
@@ -276,7 +276,6 @@ void Host_Map_f (void)
        if (cmd_source != src_command)
                return;
 
-       SCR_BeginLoadingPlaque ();
        cls.demonum = -1;               // stop demo loop in case this fails
 
        CL_Disconnect ();
@@ -323,7 +322,6 @@ void Host_Changelevel_f (void)
        key_consoleactive = 0;
 
        SV_SaveSpawnparms ();
-       SCR_BeginLoadingPlaque();
        allowcheats = sv_cheats.integer != 0;
        strcpy(level, Cmd_Argv(1));
        SV_SpawnServer(level);
@@ -359,7 +357,6 @@ void Host_Restart_f (void)
        key_dest = key_game;
        key_consoleactive = 0;
 
-       SCR_BeginLoadingPlaque();
        allowcheats = sv_cheats.integer != 0;
        strcpy(mapname, sv.name);
        SV_SpawnServer(mapname);
@@ -387,7 +384,6 @@ void Host_Reconnect_f (void)
                //Con_Print("reconnect: no signon, ignoring reconnect\n");
                return;
        }
-       SCR_BeginLoadingPlaque();
        cls.signon = 0;         // need new connection messages
 }
 
@@ -596,8 +592,6 @@ void Host_Loadgame_f (void)
                return;
        }
 
-       SCR_BeginLoadingPlaque ();
-
        str = FS_Getline (f);
        for (i = 0;i < NUM_SPAWN_PARMS;i++)
        {
index 73d2fdbe41cb32df9e638d39c46c033dcbf6d867..8005c874810e89418eb1fdfd61cd5f77bb18c817 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1607,6 +1607,9 @@ void SV_SpawnServer (const char *server)
 
        Con_DPrintf("SpawnServer: %s\n", server);
 
+       if (cls.state != ca_dedicated)
+               SCR_BeginLoadingPlaque();
+
        snprintf (modelname, sizeof(modelname), "maps/%s.bsp", server);
        worldmodel = Mod_ForName(modelname, false, true, true);
        if (!worldmodel || !worldmodel->TraceBox)