mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
If the server still hasn't initialised, allow more precaches.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@128 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
19e3909bde
commit
7dd720a4fc
1 changed files with 19 additions and 9 deletions
|
@ -48,11 +48,21 @@ int SV_ModelIndex (char *name)
|
||||||
if (!name || !name[0])
|
if (!name || !name[0])
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (i=0 ; i<MAX_MODELS && sv.model_precache[i] ; i++)
|
for (i=1 ; i<MAX_MODELS && sv.model_precache[i] ; i++)
|
||||||
if (!strcmp(sv.model_precache[i], name))
|
if (!strcmp(sv.model_precache[i], name))
|
||||||
return i;
|
return i;
|
||||||
if (i==MAX_MODELS || !sv.model_precache[i])
|
if (i==MAX_MODELS || !sv.model_precache[i])
|
||||||
|
{
|
||||||
|
if (i!=MAX_MODELS && sv.state == ss_loading)
|
||||||
|
{
|
||||||
|
Q_strncpyz(sv.model_precache[i], name, sizeof(sv.model_precache[i]));
|
||||||
|
if (!strcmp(name + strlen(name) - 4, ".bsp"))
|
||||||
|
sv.models[i] = Mod_FindName(sv.model_precache[i]);
|
||||||
|
Con_Printf("WARNING: SV_ModelIndex: model %s not precached", name);
|
||||||
|
}
|
||||||
|
else
|
||||||
SV_Error ("SV_ModelIndex: model %s not precached", name);
|
SV_Error ("SV_ModelIndex: model %s not precached", name);
|
||||||
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -890,13 +900,6 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
|
||||||
// look up some model indexes for specialized message compression
|
// look up some model indexes for specialized message compression
|
||||||
SV_FindModelNumbers ();
|
SV_FindModelNumbers ();
|
||||||
|
|
||||||
// all spawning is completed, any further precache statements
|
|
||||||
// or prog writes to the signon message are errors
|
|
||||||
if (usecinematic)
|
|
||||||
sv.state = ss_cinematic;
|
|
||||||
else
|
|
||||||
sv.state = ss_active;
|
|
||||||
|
|
||||||
#ifndef SERVERONLY
|
#ifndef SERVERONLY
|
||||||
current_loading_size+=10;
|
current_loading_size+=10;
|
||||||
SCR_BeginLoadingPlaque();
|
SCR_BeginLoadingPlaque();
|
||||||
|
@ -925,6 +928,13 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
|
||||||
SVNQ_CreateBaseline();
|
SVNQ_CreateBaseline();
|
||||||
sv.signon_buffer_size[sv.num_signon_buffers-1] = sv.signon.cursize;
|
sv.signon_buffer_size[sv.num_signon_buffers-1] = sv.signon.cursize;
|
||||||
|
|
||||||
|
// all spawning is completed, any further precache statements
|
||||||
|
// or prog writes to the signon message are errors
|
||||||
|
if (usecinematic)
|
||||||
|
sv.state = ss_cinematic;
|
||||||
|
else
|
||||||
|
sv.state = ss_active;
|
||||||
|
|
||||||
SV_GibFilterInit();
|
SV_GibFilterInit();
|
||||||
SV_FilterImpulseInit();
|
SV_FilterImpulseInit();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue