host.c (Host_Init): Do not exec quake.rc for dedicated servers. Instead,

exec autoexec.cfg and stuffcmds in that case. Also moved running the start
map for dedicated servers here.
host_cmd.c (Host_Startdemos_f): Moved running the start map for dedicated
servers to Host_Init().


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@234 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2010-06-26 08:45:40 +00:00
parent 1496d179e5
commit d65f8679a7
2 changed files with 16 additions and 10 deletions

View file

@ -852,13 +852,14 @@ void Host_Init (quakeparms_t *parms)
CDAudio_Init ();
Sbar_Init ();
CL_Init ();
}
Cbuf_InsertText ("exec quake.rc\n");
// Cbuf_InsertText ("exec fitzquake.rc\n"); //johnfitz (inserted second so it'll be executed first)
// Cbuf_InsertText ("exec fitzquake.rc\n"); //johnfitz (inserted second so it'll be executed first)
Cbuf_AddText ("\n\nvid_unlock\n"); //johnfitz -- in case the vid mode was locked during vid_init, we can unlock it now.
//note: added two newlines to the front becuase the command buffer swallows one of them.
// johnfitz -- in case the vid mode was locked during vid_init, we can unlock it now.
// note: two leading newlines because the command buffer swallows one of them.
Cbuf_AddText ("\n\nvid_unlock\n");
}
Hunk_AllocName (0, "-HOST_HUNKLEVEL-");
host_hunklevel = Hunk_LowMark ();
@ -866,6 +867,15 @@ void Host_Init (quakeparms_t *parms)
host_initialized = true;
Con_Printf ("\n========= Quake Initialized =========\n\n"); //johnfitz - was Sys_Printf
if (cls.state == ca_dedicated)
{
Cbuf_AddText ("exec autoexec.cfg\n");
Cbuf_AddText ("stuffcmds");
Cbuf_Execute ();
if (!sv.active)
Cbuf_AddText ("map start\n");
}
}

View file

@ -2134,11 +2134,7 @@ void Host_Startdemos_f (void)
int i, c;
if (cls.state == ca_dedicated)
{
if (!sv.active)
Cbuf_AddText ("map start\n");
return;
}
c = Cmd_Argc() - 1;
if (c > MAX_DEMOS)