Don't lose sv.recorders on map change

This fixes the "reconnect" (or anything else, for that matter) not being sent
to qtv proxies after loading a level while the procies are connected.
This commit is contained in:
Bill Currie 2010-01-13 06:44:57 +00:00 committed by Jeff Teunissen
parent b61a336d8a
commit 465d5572dd

View file

@ -307,6 +307,7 @@ SV_SpawnServer (const char *server)
char *buf;
edict_t *ent;
int i;
struct recorder_s *recorders;
Sys_DPrintf ("SpawnServer: %s\n", server);
@ -321,8 +322,11 @@ SV_SpawnServer (const char *server)
Mod_ClearAll ();
Hunk_FreeToLowMark (host_hunklevel);
// wipe the entire per-level structure
// wipe the entire per-level structure, but don't lose sv.recorders
// (good thing we're not multi-threaded FIXME?)
recorders = sv.recorders;
memset (&sv, 0, sizeof (sv));
sv.recorders = recorders;
sv.datagram.maxsize = sizeof (sv.datagram_buf);
sv.datagram.data = sv.datagram_buf;