diff --git a/nq/source/sv_main.c b/nq/source/sv_main.c index 4369b4fe1..26551118a 100644 --- a/nq/source/sv_main.c +++ b/nq/source/sv_main.c @@ -36,6 +36,7 @@ static __attribute__ ((unused)) const char rcsid[] = #include "QF/cvar.h" #include "QF/msg.h" #include "QF/sys.h" +#include "QF/va.h" #include "compat.h" #include "host.h" @@ -898,6 +899,7 @@ SV_SaveSpawnparms (void) void SV_SpawnServer (const char *server) { + char *buf; int i; edict_t *ent; @@ -1007,7 +1009,12 @@ SV_SpawnServer (const char *server) // serverflags are for cross level information (sigils) *sv_globals.serverflags = svs.serverflags; - 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); + } sv.active = true; diff --git a/qw/source/sv_init.c b/qw/source/sv_init.c index 3ab56477e..5d5039b24 100644 --- a/qw/source/sv_init.c +++ b/qw/source/sv_init.c @@ -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 ();