From 465d5572dd7edbf8ae34c05a332c9f8aad035556 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 13 Jan 2010 06:44:57 +0000 Subject: [PATCH] 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. --- qw/source/sv_init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qw/source/sv_init.c b/qw/source/sv_init.c index bc94839d9..919a790e1 100644 --- a/qw/source/sv_init.c +++ b/qw/source/sv_init.c @@ -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;