From: havoc Date: Fri, 4 Feb 2005 13:48:17 +0000 (+0000) Subject: implemented DP_CON_STARTMAP extension which defines two configurable aliases to choos... X-Git-Tag: xonotic-v0.1.0preview~5159 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a84da20a7afb7f838f69123b47e6a451d3426e88;p=xonotic%2Fdarkplaces.git implemented DP_CON_STARTMAP extension which defines two configurable aliases to choose a start map git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5002 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host.c b/host.c index 833fce9e..a4debb62 100644 --- 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 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 cc78744e..8b7559b8 100644 --- 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: diff --git a/pr_cmds.c b/pr_cmds.c index 2d37e226..6d1520eb 100644 --- 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 "