mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 15:41:59 +00:00
ent file support
This commit is contained in:
parent
87a31439e4
commit
25a7216b8c
2 changed files with 15 additions and 2 deletions
|
@ -36,6 +36,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
||||||
#include "QF/cvar.h"
|
#include "QF/cvar.h"
|
||||||
#include "QF/msg.h"
|
#include "QF/msg.h"
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
|
#include "QF/va.h"
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "host.h"
|
#include "host.h"
|
||||||
|
@ -898,6 +899,7 @@ SV_SaveSpawnparms (void)
|
||||||
void
|
void
|
||||||
SV_SpawnServer (const char *server)
|
SV_SpawnServer (const char *server)
|
||||||
{
|
{
|
||||||
|
char *buf;
|
||||||
int i;
|
int i;
|
||||||
edict_t *ent;
|
edict_t *ent;
|
||||||
|
|
||||||
|
@ -1007,7 +1009,12 @@ SV_SpawnServer (const char *server)
|
||||||
// serverflags are for cross level information (sigils)
|
// serverflags are for cross level information (sigils)
|
||||||
*sv_globals.serverflags = svs.serverflags;
|
*sv_globals.serverflags = svs.serverflags;
|
||||||
|
|
||||||
|
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);
|
ED_LoadFromFile (&sv_pr_state, sv.worldmodel->entities);
|
||||||
|
}
|
||||||
|
|
||||||
sv.active = true;
|
sv.active = true;
|
||||||
|
|
||||||
|
|
|
@ -302,6 +302,7 @@ SV_CheckModel (const char *mdl)
|
||||||
void
|
void
|
||||||
SV_SpawnServer (const char *server)
|
SV_SpawnServer (const char *server)
|
||||||
{
|
{
|
||||||
|
char *buf;
|
||||||
edict_t *ent;
|
edict_t *ent;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -411,7 +412,12 @@ SV_SpawnServer (const char *server)
|
||||||
SV_ProgStartFrame ();
|
SV_ProgStartFrame ();
|
||||||
|
|
||||||
// load and spawn all other entities
|
// load and spawn all other 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);
|
ED_LoadFromFile (&sv_pr_state, sv.worldmodel->entities);
|
||||||
|
}
|
||||||
|
|
||||||
// look up some model indexes for specialized message compression
|
// look up some model indexes for specialized message compression
|
||||||
SV_FindModelNumbers ();
|
SV_FindModelNumbers ();
|
||||||
|
|
Loading…
Reference in a new issue