WriteVariables() public static method

Cvar_WriteVariables Writes lines containing "set variable value" for all variables with the archive flag set to true.
public static WriteVariables ( Stream dest ) : void
dest Stream
return void
Esempio n. 1
0
 /// <summary>
 /// Host_WriteConfiguration
 /// Writes key bindings and archived cvars to config.cfg
 /// </summary>
 static void WriteConfiguration()
 {
     // dedicated servers initialize the host but don't parse and set the
     // config.cfg cvars
     if (_IsInitialized & !Host.IsDedicated)
     {
         string path = Path.Combine(Common.GameDir, "config.cfg");
         using (FileStream fs = Sys.FileOpenWrite(path, true))
         {
             if (fs != null)
             {
                 Key.WriteBindings(fs);
                 Cvar.WriteVariables(fs);
             }
         }
     }
 }