コード例 #1
0
        /// <summary>
        /// Host_WriteConfiguration
        /// Writes key bindings and archived cvars to config.cfg
        /// </summary>
        private void WriteConfiguration( )
        {
            // dedicated servers initialize the host but don't parse and set the
            // config.cfg cvars
            if (IsInitialised & !IsDedicated)
            {
                var path = Path.Combine(FileSystem.GameDir, "config.cfg");

                using (var fs = FileSystem.OpenWrite(path, true))
                {
                    if (fs != null)
                    {
                        Keyboard.WriteBindings(fs);
                        CVars.WriteVariables(fs);
                    }
                }
            }
        }