From 1cd0078fcad6703662dfef3a547b70126cb01a4e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 10 Feb 2000 05:45:53 +0000 Subject: [PATCH] qw now links --- common/host.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/common/host.c b/common/host.c index ffcb403..81b35eb 100644 --- a/common/host.c +++ b/common/host.c @@ -66,7 +66,7 @@ jmp_buf host_abort; double realtime; // without any filtering or bounding double oldrealtime; // last frame run - +qboolean isDedicated; int fps_count; int vcrFile = -1; @@ -507,3 +507,32 @@ Host_Shutdown( void ) VID_Shutdown(); } } + +/* +=============== +Host_WriteConfiguration + +Writes key bindings and archived cvars to config.cfg +=============== +*/ +void Host_WriteConfiguration (void) +{ + QFile *f; + +// dedicated servers initialize the host but don't parse and set the +// config.cfg cvars + if (host_initialized & !isDedicated) + { + f = Qopen (va("%s/config.cfg",com_gamedir), "w"); + if (!f) + { + Con_Printf ("Couldn't write config.cfg.\n"); + return; + } + + Key_WriteBindings (f); + Cvar_WriteVariables (f); + + Qclose (f); + } +}