Ejemplo n.º 1
0
        public idAsyncNetwork()
        {
            _client = new idAsyncClient();
            _server = new idAsyncServer();

            new idCvar("net_verbose", "0", 0, 2, "1 = verbose output, 2 = even more verbose output", new ArgCompletion_Integer(0, 2), CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
            new idCvar("net_allowCheats", "0", "Allow cheats in network game", CvarFlags.System | CvarFlags.Bool | CvarFlags.NetworkSync);
#if ID_DEDICATED
            // dedicated executable can only have a value of 1 for net_serverDedicated
            new idCvar("net_serverDedicated", "1", "", CvarFlags.ServerInfo | CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat | CvarFlags.ReadOnly);
#else
            new idCvar("net_serverDedicated", "0", 0, 2, "1 = text console dedicated server, 2 = graphical dedicated server", new ArgCompletion_Integer(0, 2), CvarFlags.ServerInfo | CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
#endif
            new idCvar("net_serverSnapshotDelay", "50", "delay between snapshots in milliseconds", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
            new idCvar("net_serverMaxClientRate", "16000", "maximum rate to a client in bytes/sec", CvarFlags.System | CvarFlags.Integer | CvarFlags.Archive | CvarFlags.NoCheat);
            new idCvar("net_clientMaxRate", "16000", "maximum rate requested by client from server in bytes/sec", CvarFlags.System | CvarFlags.Integer | CvarFlags.Archive | CvarFlags.NoCheat);
            new idCvar("net_serverMaxUsercmdRelay", "5", 1, idE.MaxUserCommandRelay, "maximum number of usercmds from other clients the server relays to a client", new ArgCompletion_Integer(0, idE.MaxUserCommandRelay), CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
            new idCvar("net_serverZombieTimeout", "5", "disconnected client timeout in seconds", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
            new idCvar("net_serverClientTimeout", "40", "client time out in seconds", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
            new idCvar("net_clientServerTimeout", "40", "server time out in seconds", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
            new idCvar("net_serverDrawClient", "-1", "number of client for which to draw view on server", CvarFlags.System | CvarFlags.Integer);
            new idCvar("net_serverRemoteConsolePassword", "", "remote console password", CvarFlags.System | CvarFlags.NoCheat);
            new idCvar("net_clientPrediction", "16", "additional client side prediction in milliseconds", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
            new idCvar("net_clientMaxPrediction", "1000", "maximum number of milliseconds a client can predict ahead of server.", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
            new idCvar("net_clientUsercmdBackup", "5", "number of usercmds to resend", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
            new idCvar("net_clientRemoteConsoleAddress", "localhost", "remote console address", CvarFlags.System | CvarFlags.NoCheat);
            new idCvar("net_clientRemoteConsolePassword", "", "remote console password", CvarFlags.System | CvarFlags.NoCheat);
            new idCvar("net_master0", string.Format("{0}:{1}", idE.MasterServerAddress, idE.MasterServerPort), "idnet master server address", CvarFlags.System | CvarFlags.ReadOnly);
            new idCvar("net_master1", "", "1st master server address", CvarFlags.System | CvarFlags.Archive);
            new idCvar("net_master2", "", "2nd master server address", CvarFlags.System | CvarFlags.Archive);
            new idCvar("net_master3", "", "3rd master server address", CvarFlags.System | CvarFlags.Archive);
            new idCvar("net_master4", "", "4th master server address", CvarFlags.System | CvarFlags.Archive);
            new idCvar("net_LANServer", "0", "config LAN games only - affects clients and servers", CvarFlags.System | CvarFlags.Bool | CvarFlags.NoCheat);
            new idCvar("net_serverReloadEngine", "0", "perform a full reload on next map restart (including flushing referenced pak files) - decreased if > 0", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
            new idCvar("net_serverAllowServerMod", "0", "allow server-side mods", CvarFlags.System | CvarFlags.Bool | CvarFlags.NoCheat);
            new idCvar("si_idleServer", "0", "game clients are idle", CvarFlags.System | CvarFlags.Bool | CvarFlags.Init | CvarFlags.ServerInfo);
            new idCvar("net_clientDownload", "1", "client pk4 downloads policy: 0 - never, 1 - ask, 2 - always (will still prompt for binary code)", CvarFlags.System | CvarFlags.Integer | CvarFlags.Archive);
        }
Ejemplo n.º 2
0
		public idAsyncNetwork()
		{
			_client = new idAsyncClient();
			_server = new idAsyncServer();

			new idCvar("net_verbose", "0", 0, 2, "1 = verbose output, 2 = even more verbose output", new ArgCompletion_Integer(0, 2), CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
			new idCvar("net_allowCheats", "0", "Allow cheats in network game", CvarFlags.System | CvarFlags.Bool | CvarFlags.NetworkSync);
#if ID_DEDICATED
			// dedicated executable can only have a value of 1 for net_serverDedicated
			new idCvar("net_serverDedicated", "1", "", CvarFlags.ServerInfo | CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat | CvarFlags.ReadOnly);
#else
			new idCvar("net_serverDedicated", "0", 0, 2, "1 = text console dedicated server, 2 = graphical dedicated server", new ArgCompletion_Integer(0, 2), CvarFlags.ServerInfo | CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
#endif
			new idCvar("net_serverSnapshotDelay", "50", "delay between snapshots in milliseconds", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
			new idCvar("net_serverMaxClientRate", "16000", "maximum rate to a client in bytes/sec", CvarFlags.System | CvarFlags.Integer | CvarFlags.Archive | CvarFlags.NoCheat);
			new idCvar("net_clientMaxRate", "16000", "maximum rate requested by client from server in bytes/sec", CvarFlags.System | CvarFlags.Integer | CvarFlags.Archive | CvarFlags.NoCheat);
			new idCvar("net_serverMaxUsercmdRelay", "5", 1, idE.MaxUserCommandRelay, "maximum number of usercmds from other clients the server relays to a client", new ArgCompletion_Integer(0, idE.MaxUserCommandRelay), CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
			new idCvar("net_serverZombieTimeout", "5", "disconnected client timeout in seconds", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
			new idCvar("net_serverClientTimeout", "40", "client time out in seconds", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
			new idCvar("net_clientServerTimeout", "40", "server time out in seconds", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
			new idCvar("net_serverDrawClient", "-1", "number of client for which to draw view on server", CvarFlags.System | CvarFlags.Integer);
			new idCvar("net_serverRemoteConsolePassword", "", "remote console password", CvarFlags.System | CvarFlags.NoCheat);
			new idCvar("net_clientPrediction", "16", "additional client side prediction in milliseconds", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
			new idCvar("net_clientMaxPrediction", "1000", "maximum number of milliseconds a client can predict ahead of server.", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
			new idCvar("net_clientUsercmdBackup", "5", "number of usercmds to resend", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
			new idCvar("net_clientRemoteConsoleAddress", "localhost", "remote console address", CvarFlags.System | CvarFlags.NoCheat);
			new idCvar("net_clientRemoteConsolePassword", "", "remote console password", CvarFlags.System | CvarFlags.NoCheat);
			new idCvar("net_master0", string.Format("{0}:{1}", idE.MasterServerAddress, idE.MasterServerPort), "idnet master server address", CvarFlags.System | CvarFlags.ReadOnly);
			new idCvar("net_master1", "", "1st master server address", CvarFlags.System | CvarFlags.Archive);
			new idCvar("net_master2", "", "2nd master server address", CvarFlags.System | CvarFlags.Archive);
			new idCvar("net_master3", "", "3rd master server address", CvarFlags.System | CvarFlags.Archive);
			new idCvar("net_master4", "", "4th master server address", CvarFlags.System | CvarFlags.Archive);
			new idCvar("net_LANServer", "0", "config LAN games only - affects clients and servers", CvarFlags.System | CvarFlags.Bool | CvarFlags.NoCheat);
			new idCvar("net_serverReloadEngine", "0", "perform a full reload on next map restart (including flushing referenced pak files) - decreased if > 0", CvarFlags.System | CvarFlags.Integer | CvarFlags.NoCheat);
			new idCvar("net_serverAllowServerMod", "0", "allow server-side mods", CvarFlags.System | CvarFlags.Bool | CvarFlags.NoCheat);
			new idCvar("si_idleServer", "0", "game clients are idle", CvarFlags.System | CvarFlags.Bool | CvarFlags.Init | CvarFlags.ServerInfo);
			new idCvar("net_clientDownload", "1", "client pk4 downloads policy: 0 - never, 1 - ask, 2 - always (will still prompt for binary code)", CvarFlags.System | CvarFlags.Integer | CvarFlags.Archive);
		}