ent file support

This commit is contained in:
Bill Currie 2003-03-25 17:49:27 +00:00
parent 87a31439e4
commit 25a7216b8c
2 changed files with 15 additions and 2 deletions

View file

@ -302,6 +302,7 @@ SV_CheckModel (const char *mdl)
void
SV_SpawnServer (const char *server)
{
char *buf;
edict_t *ent;
int i;
@ -411,7 +412,12 @@ SV_SpawnServer (const char *server)
SV_ProgStartFrame ();
// load and spawn all other entities
ED_LoadFromFile (&sv_pr_state, sv.worldmodel->entities);
if ((buf = QFS_LoadFile (va ("maps/%s.ent", server), 0))) {
ED_LoadFromFile (&sv_pr_state, buf);
free (buf);
} else {
ED_LoadFromFile (&sv_pr_state, sv.worldmodel->entities);
}
// look up some model indexes for specialized message compression
SV_FindModelNumbers ();