mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 01:11:18 +00:00
per map config files (eg, maps/start.cfg for maps/start.bsp)
This commit is contained in:
parent
abf1ef37dc
commit
bd9092a626
2 changed files with 35 additions and 8 deletions
|
@ -218,6 +218,22 @@ CL_KeepaliveMessage (void)
|
|||
SZ_Clear (&cls.message);
|
||||
}
|
||||
|
||||
void CL_NewMap (const char *mapname)
|
||||
{
|
||||
char *name = malloc (strlen (mapname) + 4 + 1);
|
||||
|
||||
|
||||
R_NewMap (cl.worldmodel, cl.model_precache, MAX_MODELS);
|
||||
Con_NewMap ();
|
||||
|
||||
COM_StripExtension (mapname, name);
|
||||
strcat (name, ".cfg");
|
||||
Cbuf_AddText (host_cbuf, "exec ");
|
||||
Cbuf_AddText (host_cbuf, name);
|
||||
Cbuf_AddText (host_cbuf, "\n");
|
||||
free (name);
|
||||
}
|
||||
|
||||
void
|
||||
CL_ParseServerInfo (void)
|
||||
{
|
||||
|
@ -310,9 +326,7 @@ CL_ParseServerInfo (void)
|
|||
|
||||
// local state
|
||||
cl_entities[0].model = cl.worldmodel = cl.model_precache[1];
|
||||
|
||||
R_NewMap (cl.worldmodel, cl.model_precache, MAX_MODELS);
|
||||
Con_NewMap ();
|
||||
CL_NewMap (model_precache[1]);
|
||||
|
||||
Hunk_Check (); // make sure nothing is hurt
|
||||
|
||||
|
|
|
@ -246,6 +246,23 @@ CL_CheckOrDownloadFile (const char *filename)
|
|||
return false;
|
||||
}
|
||||
|
||||
void CL_NewMap (const char *mapname)
|
||||
{
|
||||
char *name = malloc (strlen (mapname) + 4 + 1);
|
||||
|
||||
R_NewMap (cl.worldmodel, cl.model_precache, MAX_MODELS);
|
||||
Team_NewMap ();
|
||||
Con_NewMap ();
|
||||
Hunk_Check (); // make sure nothing is hurt
|
||||
|
||||
COM_StripExtension (mapname, name);
|
||||
strcat (name, ".cfg");
|
||||
Cbuf_AddText (cl_cbuf, "exec ");
|
||||
Cbuf_AddText (cl_cbuf, name);
|
||||
Cbuf_AddText (cl_cbuf, "\n");
|
||||
free (name);
|
||||
}
|
||||
|
||||
void
|
||||
Model_NextDownload (void)
|
||||
{
|
||||
|
@ -315,11 +332,7 @@ Model_NextDownload (void)
|
|||
|
||||
// all done
|
||||
cl.worldmodel = cl.model_precache[1];
|
||||
|
||||
R_NewMap (cl.worldmodel, cl.model_precache, MAX_MODELS);
|
||||
Team_NewMap ();
|
||||
Con_NewMap ();
|
||||
Hunk_Check (); // make sure nothing is hurt
|
||||
CL_NewMap (cl.model_name[1]);
|
||||
|
||||
// done with modellist, request first of static signon messages
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
|
|
Loading…
Reference in a new issue