예제 #1
0
        private static void RegisterServerOnlyCvars(EngineConfiguration configuration)
        {
            // fs - File system.
            ScriptingInterface.RegisterCvarString("fs_server", "Server DLL location", CvarFlag.ReadOnly, configuration.ServerDLL);

            // sv - Server.
            sv_cheats = ScriptingInterface.RegisterCvarBool("sv_cheats", "Enable cheats", CvarFlag.WriteProtected, false);
            ScriptingInterface.RegisterCvarInt("sv_fps", "Amount of server frames per second", CvarFlag.WriteProtected, 20, 1, 1000);

            ScriptingInterface.RegisterCvarCallback <int>("sv_fps", sv_fpsCallback);
        }
예제 #2
0
 internal BackEnd()
 {
     this.soundThread           = new Thread(SoundThread);
     this.soundThread.Name      = "Sound mixing";
     this.initEvent             = new AutoResetEvent(false);
     this.startEvent            = new AutoResetEvent(false);
     this.device                = new OpenALDevice();
     this.mixingSystem          = new MixingSystem();
     this.snd_shutdownRequested = Engine.ScriptingInterface.GetCvar <CvarBool>("snd_shutdownRequested");
     this.frontBuffer           = new ArrayQueue <Command>(32);
     this.backBuffer            = new ArrayQueue <Command>(32);
     this.syncRoot              = new object();
     this.initialized           = false;
     this.timer = null;
 }
예제 #3
0
        private static void r_restart(ArgList args)
        {
            CvarBool r_restartRequested = ScriptingInterface.GetCvar <CvarBool>("r_restartRequested");

            r_restartRequested.Value = true;
        }