From fea66f07842b903604e6c1e942821477c5437409 Mon Sep 17 00:00:00 2001
From: havoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Tue, 26 Oct 2004 07:50:27 +0000
Subject: [PATCH] moved the map startup for -listen and -dedicated servers from
 startdemos to just after the config parsing, so that startdemos is no longer
 required

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4712 d7cf8633-e32d-0410-b094-e92efae38249
---
 host.c     | 10 ++++++++++
 host_cmd.c |  9 ---------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/host.c b/host.c
index fd2b3a57..6c244d45 100644
--- a/host.c
+++ b/host.c
@@ -911,6 +911,16 @@ void Host_Init (void)
 	else
 		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");
+	}
+
 	// 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)
 	i = COM_CheckParm("-benchmark");
diff --git a/host_cmd.c b/host_cmd.c
index 17bade24..f76abd99 100644
--- a/host_cmd.c
+++ b/host_cmd.c
@@ -1670,16 +1670,7 @@ void Host_Startdemos_f (void)
 	int		i, c;
 
 	if (cls.state == ca_dedicated || COM_CheckParm("-listen"))
-	{
-		if (!sv.active)
-		{
-			if (gamemode == GAME_TRANSFUSION)
-				Cbuf_AddText ("map bb1\n");
-			else
-				Cbuf_AddText ("map start\n");
-		}
 		return;
-	}
 
 	c = Cmd_Argc() - 1;
 	if (c > MAX_DEMOS)
-- 
2.39.5