]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fixed problems in the Host_Init Cbuf_InsertText stuff (by changing it to Cbuf_AddText...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 9 May 2005 13:03:18 +0000 (13:03 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 9 May 2005 13:03:18 +0000 (13:03 +0000)
added Host_StartVideo to a few more places

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5253 d7cf8633-e32d-0410-b094-e92efae38249

cd_shared.c
cl_video.c
host.c
menu.c

index 876a0a78da7a89f494b18ea0a437ccfa060793c6..5d093e73292a0b86f258dd7419c5b576d36900ed 100644 (file)
@@ -213,6 +213,8 @@ static void CD_f (void)
        int ret;
        int n;
 
+       Host_StartVideo();
+
        if (Cmd_Argc() < 2)
                return;
 
index 8baebeddab8f27b44214cd8b9a1366e5b52c83c3..cac5af695d7922eea2bb392e476aacec73b41918 100644 (file)
@@ -268,6 +268,8 @@ static void CL_PlayVideo_f(void)
 {
        char name[1024];
 
+       Host_StartVideo();
+
        if (Cmd_Argc() != 2)
        {
                Con_Print("usage: playvideo <videoname>\nplays video named video/<videoname>.dpv\n");
diff --git a/host.c b/host.c
index fc4d8696b918fe1ffe2051b5690c869bfdcb0920..082e343bad7712536d6c2dae6d5b6e724e767b01 100644 (file)
--- a/host.c
+++ b/host.c
@@ -184,7 +184,7 @@ void Host_ServerOptions (void)
                        else
                        {
                                // default players in some games, singleplayer in most
-                               if (gamemode != GAME_TRANSFUSION && gamemode != GAME_GOODVSBAD2 && gamemode != GAME_NEXUIZ && gamemode != GAME_BATTLEMECH)
+                               if (gamemode != GAME_GOODVSBAD2 && gamemode != GAME_NEXUIZ && gamemode != GAME_BATTLEMECH)
                                        svs.maxclients = 1;
                        }
                }
@@ -998,23 +998,23 @@ void Host_Init (void)
        // set up the default startmap_sp and startmap_dm aliases (mods can
        // override these) and then execute the quake.rc startup script
        if (gamemode == GAME_NEHAHRA)
-               Cbuf_InsertText("alias startmap_sp \"map nehstart\"\nalias startmap_dm \"map nehstart\"\nexec quake.rc\n");
+               Cbuf_AddText("alias startmap_sp \"map nehstart\"\nalias startmap_dm \"map nehstart\"\nexec quake.rc\n");
        else if (gamemode == GAME_TRANSFUSION)
-               Cbuf_InsertText("alias startmap_sp \"map e1m1\"\n""alias startmap_dm \"map bb1\"\nexec quake.rc\n");
+               Cbuf_AddText("alias startmap_sp \"map e1m1\"\n""alias startmap_dm \"map bb1\"\nexec quake.rc\n");
        else if (gamemode == GAME_NEXUIZ)
-               Cbuf_InsertText("alias startmap_sp \"map nexdm01\"\nalias startmap_dm \"map nexdm01\"\nexec quake.rc\n");
+               Cbuf_AddText("alias startmap_sp \"map nexdm01\"\nalias startmap_dm \"map nexdm01\"\nexec quake.rc\n");
        else if (gamemode == GAME_TEU)
-               Cbuf_InsertText("alias startmap_sp \"map start\"\nalias startmap_dm \"map start\"\nexec teu.rc\n");
+               Cbuf_AddText("alias startmap_sp \"map start\"\nalias startmap_dm \"map start\"\nexec teu.rc\n");
        else
-               Cbuf_InsertText("alias startmap_sp \"map start\"\nalias startmap_dm \"map start\"\nexec quake.rc\n");
+               Cbuf_AddText("alias startmap_sp \"map start\"\nalias startmap_dm \"map start\"\nexec quake.rc\n");
+       Cbuf_Execute();
 
        // if stuffcmds wasn't run, then quake.rc is probably missing, use default
        if (!host_stuffcmdsrun)
-               Cbuf_InsertText("exec default.cfg\nexec config.cfg\nexec autoexec.cfg\nstuffcmds\nstartdemos\n");
-
-       Cbuf_Execute();
-       Cbuf_Execute();
-       Cbuf_Execute();
+       {
+               Cbuf_AddText("exec default.cfg\nexec config.cfg\nexec autoexec.cfg\nstuffcmds\n");
+               Cbuf_Execute();
+       }
 
        // save console log up to this point to log_file if it was set by configs
        Log_Start();
@@ -1025,25 +1025,23 @@ void Host_Init (void)
        if (i && i + 1 < com_argc)
        if (!sv.active && !cls.demoplayback && !cls.connect_trying)
        {
-               Cbuf_InsertText(va("timedemo %s\n", com_argv[i + 1]));
+               Cbuf_AddText(va("timedemo %s\n", com_argv[i + 1]));
                Cbuf_Execute();
        }
 
        if (cls.state == ca_dedicated || COM_CheckParm("-listen"))
        if (!sv.active && !cls.demoplayback && !cls.connect_trying)
        {
-               Cbuf_InsertText("startmap_dm\n");
+               Cbuf_AddText("startmap_dm\n");
                Cbuf_Execute();
        }
 
        if (!sv.active && !cls.demoplayback && !cls.connect_trying)
        {
-               Cbuf_InsertText("togglemenu\n");
                if (gamemode == GAME_NEXUIZ)
-               {
-                       Cbuf_InsertText("playvideo logo\n");
-                       Cbuf_InsertText("cd loop 1\n");
-               }
+                       Cbuf_AddText("togglemenu\nplayvideo logo\ncd loop 1\n");
+               else
+                       Cbuf_AddText("togglemenu\n");
                Cbuf_Execute();
        }
 
diff --git a/menu.c b/menu.c
index 0506b8780716373a6da5b3c30b259ee2c06bfc33..99e4dff6c7ecf785d69fbed0154e9ce0a74ce198 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -4790,6 +4790,7 @@ void MR_Restart(void)
 
 void Call_MR_ToggleMenu_f(void)
 {
+       Host_StartVideo();
        if(MR_ToggleMenu_f)
                MR_ToggleMenu_f();
 }