]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
implemented DP_CON_STARTMAP extension which defines two configurable aliases to choos...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 4 Feb 2005 13:48:17 +0000 (13:48 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 4 Feb 2005 13:48:17 +0000 (13:48 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5002 d7cf8633-e32d-0410-b094-e92efae38249

host.c
menu.c
pr_cmds.c

diff --git a/host.c b/host.c
index 833fce9e3a66bcc419fc6874d4533a99a6ef1bff..a4debb6293c83c45188c87da746c131ddc139d97 100644 (file)
--- a/host.c
+++ b/host.c
@@ -947,6 +947,29 @@ void Host_Init (void)
                MR_Init();
        }
 
+       // set up the default startmap_sp and startmap_dm aliases, mods can
+       // override these
+       if (gamemode == GAME_NEHAHRA)
+       {
+               Cbuf_InsertText ("alias startmap_sp \"map nehstart\"\n");
+               Cbuf_InsertText ("alias startmap_dm \"map nehstart\"\n");
+       }
+       else if (gamemode == GAME_TRANSFUSION)
+       {
+               Cbuf_InsertText ("alias startmap_sp \"map e1m1\"\n");
+               Cbuf_InsertText ("alias startmap_dm \"map bb1\"\n");
+       }
+       else if (gamemode == GAME_NEXUIZ)
+       {
+               Cbuf_InsertText ("alias startmap_sp \"map nexdm01\"\n");
+               Cbuf_InsertText ("alias startmap_dm \"map nexdm01\"\n");
+       }
+       else
+       {
+               Cbuf_InsertText ("alias startmap_sp \"map start\"\n");
+               Cbuf_InsertText ("alias startmap_dm \"map start\"\n");
+       }
+
        // stuff it again so the first host frame will execute it again, this time
        // in its entirety
        if (gamemode == GAME_TEU)
@@ -955,14 +978,7 @@ void Host_Init (void)
                Cbuf_InsertText("exec quake.rc\n");
 
        if (!sv.active && (cls.state == ca_dedicated || COM_CheckParm("-listen")))
-       {
-               if (gamemode == GAME_TRANSFUSION)
-                       Cbuf_InsertText ("map bb1\n");
-               else if (gamemode == GAME_NEXUIZ)
-                       Cbuf_InsertText ("map nexdm01\n");
-               else
-                       Cbuf_InsertText ("map start\n");
-       }
+               Cbuf_InsertText ("startmap_dm\n");
 
        // check for special benchmark mode
 // COMMANDLINEOPTION: Client: -benchmark <demoname> runs a timedemo and quits, results of any timedemo can be found in gamedir/benchmark.log (for example id1/benchmark.log)
diff --git a/menu.c b/menu.c
index cc78744e127a4336970b74ac9c4d1a9c3cf223a7..8b7559b84649f13de5d6e121731e81cb6342d585 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -682,12 +682,7 @@ void M_SinglePlayer_Key (int key, char ascii)
                        Cbuf_AddText ("maxplayers 1\n");
                        Cbuf_AddText ("deathmatch 0\n");
                        Cbuf_AddText ("coop 0\n");
-                       if (gamemode == GAME_NEHAHRA)
-                               Cbuf_AddText ("map nehstart\n");
-                       else if (gamemode == GAME_TRANSFUSION)
-                               Cbuf_AddText ("map e1m1\n");
-                       else
-                               Cbuf_AddText ("map start\n");
+                       Cbuf_AddText ("startmap_sp\n");
                        break;
 
                case 1:
index 2d37e2266a3ef56d6437f41b4c15241d8b9a29e7..6d1520ebdfb93f52d42581690e53afe6cbb7b0b7 100644 (file)
--- a/pr_cmds.c
+++ b/pr_cmds.c
@@ -75,6 +75,7 @@ char *ENGINE_EXTENSIONS =
 "DP_CL_LOADSKY "
 "DP_CON_SET "
 "DP_CON_SETA "
+"DP_CON_STARTMAP "
 "DP_EF_ADDITIVE "
 "DP_EF_BLUE "
 "DP_EF_FLAME "