/** * @brief GLimp_InitCvars */ static void GLimp_InitCvars(void) { //r_sdlDriver = Cvar_Get("r_sdlDriver", "", CVAR_ROM); r_allowSoftwareGL = Cvar_Get("r_allowSoftwareGL", "0", CVAR_LATCH); r_allowResize = Cvar_Get("r_allowResize", "0", CVAR_ARCHIVE); // Window cvars r_fullscreen = Cvar_Get("r_fullscreen", "1", CVAR_ARCHIVE | CVAR_LATCH); r_noBorder = Cvar_Get("r_noborder", "0", CVAR_ARCHIVE | CVAR_LATCH); r_centerWindow = Cvar_Get("r_centerWindow", "0", CVAR_ARCHIVE | CVAR_LATCH); r_customwidth = Cvar_Get("r_customwidth", "1600", CVAR_ARCHIVE | CVAR_LATCH); r_customheight = Cvar_Get("r_customheight", "1024", CVAR_ARCHIVE | CVAR_LATCH); r_swapInterval = Cvar_Get("r_swapInterval", "0", CVAR_ARCHIVE); r_mode = Cvar_Get("r_mode", "-2", CVAR_ARCHIVE | CVAR_LATCH | CVAR_UNSAFE); r_customaspect = Cvar_Get("r_customaspect", "1", CVAR_ARCHIVE | CVAR_LATCH); r_displayRefresh = Cvar_Get("r_displayRefresh", "0", CVAR_LATCH); Cvar_CheckRange(r_displayRefresh, 0, 200, qtrue); // Window render surface cvars r_stencilbits = Cvar_Get("r_stencilbits", "0", CVAR_ARCHIVE | CVAR_LATCH | CVAR_UNSAFE); r_depthbits = Cvar_Get("r_depthbits", "0", CVAR_ARCHIVE | CVAR_LATCH | CVAR_UNSAFE); r_colorbits = Cvar_Get("r_colorbits", "0", CVAR_ARCHIVE | CVAR_LATCH | CVAR_UNSAFE); r_ignorehwgamma = Cvar_Get("r_ignorehwgamma", "0", CVAR_ARCHIVE | CVAR_LATCH | CVAR_UNSAFE); r_ext_multisample = Cvar_Get("r_ext_multisample", "0", CVAR_ARCHIVE | CVAR_LATCH | CVAR_UNSAFE); Cvar_CheckRange(r_ext_multisample, 0, 4, qtrue); // Old modes (these are used by the UI code) Cvar_Get("r_oldFullscreen", "", CVAR_ARCHIVE); Cvar_Get("r_oldMode", "", CVAR_ARCHIVE); Cmd_AddCommand("modelist", GLimp_ModeList_f, "Prints a list of available resolutions/modes."); Cmd_AddCommand("minimize", GLimp_Minimize, "Minimizes the game window."); }
/* ================ Con_Init ================ */ void Con_Init (void) { int i; con_notifytime = Cvar_Get ("con_notifytime", "3", 0); con_conspeed = Cvar_Get ("scr_conspeed", "3", 0); Cvar_CheckRange (con_conspeed, 1.0f, 100.0f, qfalse); con_opacity = Cvar_Get ("con_opacity", "1.0", CVAR_ARCHIVE); con_autoclear = Cvar_Get ("con_autoclear", "1", CVAR_ARCHIVE); Field_Clear( &g_consoleField ); g_consoleField.widthInChars = g_console_field_width; for ( i = 0 ; i < COMMAND_HISTORY ; i++ ) { Field_Clear( &historyEditLines[i] ); historyEditLines[i].widthInChars = g_console_field_width; } Cmd_AddCommand( "toggleconsole", Con_ToggleConsole_f ); Cmd_AddCommand( "togglemenu", Con_ToggleMenu_f ); Cmd_AddCommand( "messagemode", Con_MessageMode_f ); Cmd_AddCommand( "messagemode2", Con_MessageMode2_f ); Cmd_AddCommand( "messagemode3", Con_MessageMode3_f ); Cmd_AddCommand( "messagemode4", Con_MessageMode4_f ); Cmd_AddCommand( "clear", Con_Clear_f ); Cmd_AddCommand( "condump", Con_Dump_f ); Cmd_SetCommandCompletionFunc( "condump", Cmd_CompleteTxtName ); }
/* =============== SV_Init Only called at main exe startup, not for each game =============== */ void SV_Init (void) { SV_AddOperatorCommands (); // serverinfo vars Cvar_Get ("timelimit", "0", CVAR_SERVERINFO); Cvar_Get ("sv_keywords", "", CVAR_SERVERINFO); Cvar_Get ("protocol", va("%i", PROTOCOL_VERSION), CVAR_SERVERINFO | CVAR_ROM); sv_mapname = Cvar_Get ("mapname", "nomap", CVAR_SERVERINFO | CVAR_ROM); sv_privateClients = Cvar_Get ("sv_privateClients", "0", CVAR_SERVERINFO); sv_hostname = Cvar_Get ("sv_hostname", "noname", CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_maxclients = Cvar_Get ("sv_maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH); sv_democlients = Cvar_Get ("sv_democlients", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_ARCHIVE); sv_minRate = Cvar_Get ("sv_minRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxRate = Cvar_Get ("sv_maxRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxPing = Cvar_Get ("sv_maxPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); // systeminfo Cvar_Get ("sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM ); sv_pure = Cvar_Get ("sv_pure", "0", CVAR_SYSTEMINFO ); sv_downloadRate = Cvar_Get ("sv_downloadRate", "50000", 0 ); sv_serverid = Cvar_Get ("sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM ); #ifdef USE_VOIP sv_voip = Cvar_Get ("sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH); Cvar_CheckRange( sv_voip, 0, 1, qtrue ); #endif Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_pakNames", "", CVAR_SERVER_CREATED | CVAR_ROM ); Cvar_Get ("sv_referencedPaks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_referencedPakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); // server vars sv_rconPassword = Cvar_Get ("rconPassword", "", CVAR_TEMP ); sv_rconLog = Cvar_Get ("sv_rconLog", "", CVAR_ARCHIVE ); sv_privatePassword = Cvar_Get ("sv_privatePassword", "", CVAR_TEMP ); sv_fps = Cvar_Get ("sv_fps", "20", CVAR_TEMP ); sv_timeout = Cvar_Get ("sv_timeout", "200", CVAR_TEMP ); sv_zombietime = Cvar_Get ("sv_zombietime", "2", CVAR_TEMP ); sv_allowDownload = Cvar_Get ("sv_allowDownload", "1", CVAR_SERVERINFO | CVAR_ARCHIVE); Cvar_Get ("sv_dlURL", "", CVAR_SERVERINFO | CVAR_ARCHIVE); Cvar_Get ("sv_wwwDownload", "1", CVAR_SYSTEMINFO | CVAR_ARCHIVE); Cvar_Get ("sv_wwwBaseURL", "", CVAR_SYSTEMINFO | CVAR_ARCHIVE); sv_master[0] = Cvar_Get ("sv_master1", MASTER_SERVER_NAME, 0 ); sv_master[1] = Cvar_Get ("sv_master2", "", CVAR_ARCHIVE ); sv_master[2] = Cvar_Get ("sv_master3", "", CVAR_ARCHIVE ); sv_master[3] = Cvar_Get ("sv_master4", "", CVAR_ARCHIVE ); sv_master[4] = Cvar_Get ("sv_master5", "", CVAR_ARCHIVE ); sv_reconnectlimit = Cvar_Get ("sv_reconnectlimit", "3", 0); sv_showloss = Cvar_Get ("sv_showloss", "0", 0); sv_padPackets = Cvar_Get ("sv_padPackets", "0", 0); sv_killserver = Cvar_Get ("sv_killserver", "0", 0); sv_mapChecksum = Cvar_Get ("sv_mapChecksum", "", CVAR_ROM); sv_lanForceRate = Cvar_Get ("sv_lanForceRate", "1", CVAR_ARCHIVE ); sv_dequeuePeriod = Cvar_Get ("sv_dequeuePeriod", "500", CVAR_ARCHIVE ); sv_demoState = Cvar_Get ("sv_demoState", "0", CVAR_ROM ); sv_autoDemo = Cvar_Get ("sv_autoDemo", "0", CVAR_ARCHIVE ); }
/* ============== VM_Init ============== */ void VM_Init( void ) { Cvar_Get( "vm_cgame", "2", CVAR_ARCHIVE ); // !@# SHIP WITH SET TO 2 Cvar_Get( "vm_game", "2", CVAR_ARCHIVE ); // !@# SHIP WITH SET TO 2 Cvar_Get( "vm_ui", "2", CVAR_ARCHIVE ); // !@# SHIP WITH SET TO 2 vm_minQvmHunkMegs = Cvar_Get( "vm_minQvmHunkMegs", "2", CVAR_ARCHIVE ); Cvar_CheckRange( vm_minQvmHunkMegs, 0, 1024, qtrue ); Cmd_AddCommand("vmprofile", VM_VmProfile_f); // FIXME: doesn't print anything with +set developer 1 Cmd_AddCommand ("vminfo", VM_VmInfo_f ); Com_Memset( vmTable, 0, sizeof( vmTable ) ); }
/* ===================== Cvar_CheckRangeSafe basically a slightly modified Cvar_CheckRange for the interpreted modules ===================== */ void Cvar_CheckRangeSafe( const char *varName, float min, float max, qboolean integral ) { cvar_t *var; var = Cvar_FindVar (varName); if ( !var ) { Com_Printf( "A VM tried to add range check to unregistered cvar %s\n", varName ); return; } if ( !( var->flags & ( CVAR_VM_CREATED | CVAR_USER_CREATED ) ) ) { Com_Printf( "A VM tried to add range check to engine cvar %s\n", varName ); return; } Cvar_CheckRange( var, min, max, integral ); }
window_t WIN_Init( const windowDesc_t *windowDesc, glconfig_t *glConfig ) { Cmd_AddCommand("modelist", R_ModeList_f); Cmd_AddCommand("minimize", GLimp_Minimize); r_sdlDriver = Cvar_Get( "r_sdlDriver", "", CVAR_ROM ); // Window cvars r_fullscreen = Cvar_Get( "r_fullscreen", "0", CVAR_ARCHIVE|CVAR_LATCH ); r_noborder = Cvar_Get( "r_noborder", "0", CVAR_ARCHIVE|CVAR_LATCH ); r_centerWindow = Cvar_Get( "r_centerWindow", "0", CVAR_ARCHIVE|CVAR_LATCH ); r_customwidth = Cvar_Get( "r_customwidth", "1600", CVAR_ARCHIVE|CVAR_LATCH ); r_customheight = Cvar_Get( "r_customheight", "1024", CVAR_ARCHIVE|CVAR_LATCH ); r_swapInterval = Cvar_Get( "r_swapInterval", "0", CVAR_ARCHIVE ); r_stereo = Cvar_Get( "r_stereo", "0", CVAR_ARCHIVE|CVAR_LATCH ); r_mode = Cvar_Get( "r_mode", "4", CVAR_ARCHIVE|CVAR_LATCH ); r_displayRefresh = Cvar_Get( "r_displayRefresh", "0", CVAR_LATCH ); Cvar_CheckRange( r_displayRefresh, 0, 240, qtrue ); // Window render surface cvars r_stencilbits = Cvar_Get( "r_stencilbits", "8", CVAR_ARCHIVE|CVAR_LATCH ); r_depthbits = Cvar_Get( "r_depthbits", "0", CVAR_ARCHIVE|CVAR_LATCH ); r_colorbits = Cvar_Get( "r_colorbits", "0", CVAR_ARCHIVE|CVAR_LATCH ); r_ignorehwgamma = Cvar_Get( "r_ignorehwgamma", "0", CVAR_ARCHIVE|CVAR_LATCH ); r_ext_multisample = Cvar_Get( "r_ext_multisample", "0", CVAR_ARCHIVE|CVAR_LATCH ); // Create the window and set up the context if(!GLimp_StartDriverAndSetMode( glConfig, windowDesc, r_mode->integer, (qboolean)r_fullscreen->integer, (qboolean)r_noborder->integer )) { if( r_mode->integer != R_MODE_FALLBACK ) { Com_Printf( "Setting r_mode %d failed, falling back on r_mode %d\n", r_mode->integer, R_MODE_FALLBACK ); if (!GLimp_StartDriverAndSetMode( glConfig, windowDesc, R_MODE_FALLBACK, qfalse, qfalse )) { // Nothing worked, give up Com_Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem" ); } } } glConfig->deviceSupportsGamma = (qboolean)(!r_ignorehwgamma->integer && SDL_SetWindowBrightness( screen, 1.0f ) >= 0); Cvar_Get( "r_availableModes", "", CVAR_ROM ); // This depends on SDL_INIT_VIDEO, hence having it here IN_Init( screen ); // window_t is only really useful for Windows if the renderer wants to create a D3D context. window_t window = {}; window.api = windowDesc->api; #if defined(_WIN32) SDL_SysWMinfo info; SDL_VERSION(&info.version); if ( SDL_GetWindowWMInfo(screen, &info) ) { switch(info.subsystem) { case SDL_SYSWM_WINDOWS: window.handle = info.info.win.window; break; default: break; } } #endif return window; }
void SV_Init( void ) { SV_AddOperatorCommands(); // serverinfo vars Cvar_Get( "dmflags", "0", /*CVAR_SERVERINFO */ 0 ); Cvar_Get( "fraglimit", "0", /*CVAR_SERVERINFO */ 0 ); Cvar_Get( "timelimit", "0", CVAR_SERVERINFO ); // Rafael gameskill // sv_gameskill = Cvar_Get ("g_gameskill", "3", CVAR_SERVERINFO | CVAR_LATCH ); // done Cvar_Get( "sv_keywords", "", CVAR_SERVERINFO ); Cvar_Get( "protocol", va( "%i", ETPROTOCOL_VERSION ), CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_mapname = Cvar_Get( "mapname", "nomap", CVAR_SERVERINFO | CVAR_ROM ); sv_privateClients = Cvar_Get( "sv_privateClients", "0", CVAR_SERVERINFO ); sv_hostname = Cvar_Get( "sv_hostname", "Unnamed Unvanquished Server", CVAR_SERVERINFO | CVAR_ARCHIVE ); // #ifdef __MACOS__ sv_maxclients = Cvar_Get( "sv_maxclients", "16", CVAR_SERVERINFO | CVAR_LATCH ); //DAJ HOG #else sv_maxclients = Cvar_Get( "sv_maxclients", "20", CVAR_SERVERINFO | CVAR_LATCH ); // NERVE - SMF - changed to 20 from 8 #endif sv_maxRate = Cvar_Get( "sv_maxRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_minPing = Cvar_Get( "sv_minPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxPing = Cvar_Get( "sv_maxPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_floodProtect = Cvar_Get( "sv_floodProtect", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_allowAnonymous = Cvar_Get( "sv_allowAnonymous", "0", CVAR_SERVERINFO ); sv_friendlyFire = Cvar_Get( "g_friendlyFire", "1", CVAR_SERVERINFO | CVAR_ARCHIVE ); // NERVE - SMF sv_maxlives = Cvar_Get( "g_maxlives", "0", CVAR_ARCHIVE | CVAR_LATCH | CVAR_SERVERINFO ); // NERVE - SMF sv_needpass = Cvar_Get( "g_needpass", "0", CVAR_SERVERINFO | CVAR_ROM ); // systeminfo //bani - added cvar_t for sv_cheats so server engine can reference it sv_cheats = Cvar_Get( "sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM ); sv_serverid = Cvar_Get( "sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM ); sv_pure = Cvar_Get( "sv_pure", "1", CVAR_SYSTEMINFO ); #ifdef USE_VOIP sv_voip = Cvar_Get( "sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH ); Cvar_CheckRange( sv_voip, 0, 1, qtrue ); #endif Cvar_Get( "sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_referencedPaks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_referencedPakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); // server vars sv_rconPassword = Cvar_Get( "rconPassword", "", CVAR_TEMP ); sv_privatePassword = Cvar_Get( "sv_privatePassword", "", CVAR_TEMP ); sv_fps = Cvar_Get( "sv_fps", "120", CVAR_TEMP ); sv_timeout = Cvar_Get( "sv_timeout", "240", CVAR_TEMP ); sv_zombietime = Cvar_Get( "sv_zombietime", "2", CVAR_TEMP ); Cvar_Get( "nextmap", "", CVAR_TEMP ); sv_allowDownload = Cvar_Get( "sv_allowDownload", "1", CVAR_ARCHIVE ); sv_master[ 0 ] = Cvar_Get( "sv_master1", MASTER_SERVER_NAME, 0 ); sv_master[ 1 ] = Cvar_Get( "sv_master2", "", CVAR_ARCHIVE ); sv_master[ 2 ] = Cvar_Get( "sv_master3", "", CVAR_ARCHIVE ); sv_master[ 3 ] = Cvar_Get( "sv_master4", "", CVAR_ARCHIVE ); sv_master[ 4 ] = Cvar_Get( "sv_master5", "", CVAR_ARCHIVE ); sv_reconnectlimit = Cvar_Get( "sv_reconnectlimit", "3", 0 ); sv_tempbanmessage = Cvar_Get( "sv_tempbanmessage", "You have been kicked and are temporarily banned from joining this server.", 0 ); sv_showloss = Cvar_Get( "sv_showloss", "0", 0 ); sv_padPackets = Cvar_Get( "sv_padPackets", "0", 0 ); sv_killserver = Cvar_Get( "sv_killserver", "0", 0 ); sv_mapChecksum = Cvar_Get( "sv_mapChecksum", "", CVAR_ROM ); sv_reloading = Cvar_Get( "g_reloading", "0", CVAR_ROM ); sv_lanForceRate = Cvar_Get( "sv_lanForceRate", "1", CVAR_ARCHIVE ); sv_onlyVisibleClients = Cvar_Get( "sv_onlyVisibleClients", "0", 0 ); // DHM - Nerve sv_showAverageBPS = Cvar_Get( "sv_showAverageBPS", "0", 0 ); // NERVE - SMF - net debugging // NERVE - SMF - create user set cvars Cvar_Get( "g_userTimeLimit", "0", 0 ); Cvar_Get( "g_userAlliedRespawnTime", "0", 0 ); Cvar_Get( "g_userAxisRespawnTime", "0", 0 ); Cvar_Get( "g_maxlives", "0", 0 ); Cvar_Get( "g_altStopwatchMode", "0", CVAR_ARCHIVE ); Cvar_Get( "g_minGameClients", "8", CVAR_SERVERINFO ); Cvar_Get( "g_complaintlimit", "6", CVAR_ARCHIVE ); Cvar_Get( "gamestate", "-1", CVAR_WOLFINFO | CVAR_ROM ); Cvar_Get( "g_currentRound", "0", CVAR_WOLFINFO ); Cvar_Get( "g_nextTimeLimit", "0", CVAR_WOLFINFO ); // -NERVE - SMF // TTimo - some UI additions // NOTE: sucks to have this hardcoded really, I suppose this should be in UI Cvar_Get( "g_axismaxlives", "0", 0 ); Cvar_Get( "g_alliedmaxlives", "0", 0 ); Cvar_Get( "g_fastres", "0", CVAR_ARCHIVE ); Cvar_Get( "g_fastResMsec", "1000", CVAR_ARCHIVE ); // ATVI Tracker Wolfenstein Misc #273 Cvar_Get( "g_voteFlags", "0", CVAR_ROM | CVAR_SERVERINFO ); // ATVI Tracker Wolfenstein Misc #263 Cvar_Get( "g_antilag", "1", CVAR_ARCHIVE | CVAR_SERVERINFO ); Cvar_Get( "g_needpass", "0", CVAR_SERVERINFO ); g_gameType = Cvar_Get( "g_gametype", va( "%i", com_gameInfo.defaultGameType ), CVAR_SERVERINFO | CVAR_LATCH ); // the download netcode tops at 18/20 kb/s, no need to make you think you can go above sv_dl_maxRate = Cvar_Get( "sv_dl_maxRate", "42000", CVAR_ARCHIVE ); sv_wwwDownload = Cvar_Get( "sv_wwwDownload", "0", CVAR_ARCHIVE ); sv_wwwBaseURL = Cvar_Get( "sv_wwwBaseURL", "", CVAR_ARCHIVE ); sv_wwwDlDisconnected = Cvar_Get( "sv_wwwDlDisconnected", "0", CVAR_ARCHIVE ); sv_wwwFallbackURL = Cvar_Get( "sv_wwwFallbackURL", "", CVAR_ARCHIVE ); //bani sv_packetloss = Cvar_Get( "sv_packetloss", "0", CVAR_CHEAT ); sv_packetdelay = Cvar_Get( "sv_packetdelay", "0", CVAR_CHEAT ); // fretn - note: redirecting of clients to other servers relies on this, // ET://someserver.com sv_fullmsg = Cvar_Get( "sv_fullmsg", "Server is full.", CVAR_ARCHIVE ); sv_requireValidGuid = Cvar_Get( "sv_requireValidGuid", "0", CVAR_ARCHIVE ); #ifdef USE_HUB_SERVER sv_owHubHost = Cvar_Get( "sv_owHubHost", "", CVAR_LATCH ); sv_owHubKey = Cvar_Get( "sv_owHubKey", "defaultkey123456", CVAR_ARCHIVE ); #endif // initialize bot cvars so they arelisted and can be set before loading the botlib SV_BotInitCvars(); // init the botlib here because we need the pre-compiler in the UI SV_BotInitBotLib(); svs.serverLoad = -1; }
void SV_Init (void) { time( &svs.startTime ); SV_AddOperatorCommands (); // serverinfo vars Cvar_Get ("dmflags", "0", CVAR_SERVERINFO); Cvar_Get ("fraglimit", "20", CVAR_SERVERINFO); Cvar_Get ("timelimit", "0", CVAR_SERVERINFO); Cvar_Get ("capturelimit", "0", CVAR_SERVERINFO); // Get these to establish them and to make sure they have a default before the menus decide to stomp them. Cvar_Get ("g_maxHolocronCarry", "3", CVAR_SERVERINFO); Cvar_Get ("g_privateDuel", "1", CVAR_SERVERINFO ); Cvar_Get ("g_saberLocking", "1", CVAR_SERVERINFO ); Cvar_Get ("g_maxForceRank", "7", CVAR_SERVERINFO ); Cvar_Get ("duel_fraglimit", "10", CVAR_SERVERINFO); Cvar_Get ("g_forceBasedTeams", "0", CVAR_SERVERINFO); Cvar_Get ("g_duelWeaponDisable", "1", CVAR_SERVERINFO); sv_gametype = Cvar_Get ("g_gametype", "0", CVAR_SERVERINFO | CVAR_LATCH ); sv_needpass = Cvar_Get ("g_needpass", "0", CVAR_SERVERINFO | CVAR_ROM ); Cvar_Get ("sv_keywords", "", CVAR_SERVERINFO); Cvar_Get ("protocol", va("%i", PROTOCOL_VERSION), CVAR_SERVERINFO | CVAR_ROM); sv_mapname = Cvar_Get ("mapname", "nomap", CVAR_SERVERINFO | CVAR_ROM); sv_privateClients = Cvar_Get ("sv_privateClients", "0", CVAR_SERVERINFO); Cvar_CheckRange( sv_privateClients, 0, MAX_CLIENTS, qtrue ); sv_hostname = Cvar_Get ("sv_hostname", "*Jedi*", CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_maxclients = Cvar_Get ("sv_maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH); sv_maxRate = Cvar_Get ("sv_maxRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_dlRate = Cvar_Get ("sv_dlRate", "100", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_minPing = Cvar_Get ("sv_minPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxPing = Cvar_Get ("sv_maxPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_floodProtect = Cvar_Get ("sv_floodProtect", "1", CVAR_ARCHIVE | CVAR_SERVERINFO ); // systeminfo Cvar_Get ("sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM ); sv_serverid = Cvar_Get ("sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM ); sv_pure = Cvar_Get ("sv_pure", "0", CVAR_SYSTEMINFO ); Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_referencedPaks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_referencedPakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); // server vars sv_rconPassword = Cvar_Get ("rconPassword", "", CVAR_TEMP ); sv_privatePassword = Cvar_Get ("sv_privatePassword", "", CVAR_TEMP ); sv_snapsMin = Cvar_Get ("sv_snapsMin", "10", CVAR_ARCHIVE ); // 1 <=> sv_snapsMax sv_snapsMax = Cvar_Get ("sv_snapsMax", "40", CVAR_ARCHIVE ); // sv_snapsMin <=> sv_fps sv_fps = Cvar_Get ("sv_fps", "40", CVAR_SERVERINFO ); sv_timeout = Cvar_Get ("sv_timeout", "200", CVAR_TEMP ); sv_zombietime = Cvar_Get ("sv_zombietime", "2", CVAR_TEMP ); Cvar_Get ("nextmap", "", CVAR_TEMP ); sv_allowDownload = Cvar_Get ("sv_allowDownload", "0", CVAR_SERVERINFO); sv_master[0] = Cvar_Get ("sv_master1", MASTER_SERVER_NAME, CVAR_PROTECTED ); sv_master[1] = Cvar_Get ("sv_master2", JKHUB_MASTER_SERVER_NAME, CVAR_PROTECTED); for(int index = 2; index < MAX_MASTER_SERVERS; index++) sv_master[index] = Cvar_Get(va("sv_master%d", index + 1), "", CVAR_ARCHIVE|CVAR_PROTECTED); sv_reconnectlimit = Cvar_Get ("sv_reconnectlimit", "3", 0); sv_showghoultraces = Cvar_Get ("sv_showghoultraces", "0", 0); sv_showloss = Cvar_Get ("sv_showloss", "0", 0); sv_padPackets = Cvar_Get ("sv_padPackets", "0", 0); sv_killserver = Cvar_Get ("sv_killserver", "0", 0); sv_mapChecksum = Cvar_Get ("sv_mapChecksum", "", CVAR_ROM); sv_lanForceRate = Cvar_Get ("sv_lanForceRate", "1", CVAR_ARCHIVE ); sv_filterCommands = Cvar_Get( "sv_filterCommands", "0", CVAR_ARCHIVE ); // sv_debugserver = Cvar_Get ("sv_debugserver", "0", 0); sv_autoDemo = Cvar_Get( "sv_autoDemo", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_autoDemoBots = Cvar_Get( "sv_autoDemoBots", "0", CVAR_ARCHIVE ); sv_autoDemoMaxMaps = Cvar_Get( "sv_autoDemoMaxMaps", "0", CVAR_ARCHIVE ); sv_blockJumpSelect = Cvar_Get( "sv_blockJumpSelect", "1", CVAR_ARCHIVE ); sv_banFile = Cvar_Get( "sv_banFile", "serverbans.dat", CVAR_ARCHIVE ); // initialize bot cvars so they are listed and can be set before loading the botlib SV_BotInitCvars(); // init the botlib here because we need the pre-compiler in the UI SV_BotInitBotLib(); // Load saved bans Cbuf_AddText("sv_rehashbans\n"); // Only allocated once, no point in moving it around and fragmenting // create a heap for Ghoul2 to use for game side model vertex transforms used in collision detection #ifdef DEDICATED SV_InitRef(); #endif }
/* =============== SV_Init Only called at main exe startup, not for each game =============== */ void SV_Init (void) { int index; SV_AddOperatorCommands (); // serverinfo vars Cvar_Get ("sv_keywords", "", CVAR_SERVERINFO); sv_mapname = Cvar_Get ("mapname", "nomap", CVAR_SERVERINFO | CVAR_ROM); sv_gametypeName = Cvar_Get ("sv_gametypeName", "Unknown Gametype", CVAR_SERVERINFO | CVAR_ROM ); sv_gametypeNetName = Cvar_Get ("sv_gametypeNetName", "Unknown", CVAR_SERVERINFO | CVAR_ROM ); sv_privateClients = Cvar_Get ("sv_privateClients", "0", CVAR_SERVERINFO); sv_hostname = Cvar_Get ("sv_hostname", "noname", CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_maxclients = Cvar_Get ("sv_maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH); sv_minRate = Cvar_Get ("sv_minRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxRate = Cvar_Get ("sv_maxRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_dlRate = Cvar_Get("sv_dlRate", "100", CVAR_ARCHIVE | CVAR_SERVERINFO); sv_minPing = Cvar_Get ("sv_minPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxPing = Cvar_Get ("sv_maxPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_floodProtect = Cvar_Get ("sv_floodProtect", "1", CVAR_ARCHIVE | CVAR_SERVERINFO ); // systeminfo Cvar_Get ("sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM ); sv_serverid = Cvar_Get ("sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM ); if (!com_fs_pure->integer) sv_pure = Cvar_Get ("sv_pure", "0", CVAR_SYSTEMINFO | CVAR_ROM ); else sv_pure = Cvar_Get ("sv_pure", "1", CVAR_SYSTEMINFO ); #ifdef USE_VOIP sv_voip = Cvar_Get("sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH); Cvar_CheckRange(sv_voip, 0, 1, qtrue); #endif Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_referencedPaks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_referencedPakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); // server vars sv_rconPassword = Cvar_Get ("rconPassword", "", CVAR_TEMP ); sv_privatePassword = Cvar_Get ("sv_privatePassword", "", CVAR_TEMP ); sv_fps = Cvar_Get ("sv_fps", "20", CVAR_TEMP ); sv_timeout = Cvar_Get ("sv_timeout", "200", CVAR_TEMP ); sv_zombietime = Cvar_Get ("sv_zombietime", "2", CVAR_TEMP ); Cvar_Get ("nextmap", "", CVAR_TEMP ); sv_allowDownload = Cvar_Get ("sv_allowDownload", "0", CVAR_SERVERINFO); Cvar_Get ("sv_dlURL", "", CVAR_SERVERINFO | CVAR_ARCHIVE); sv_master[0] = Cvar_Get("sv_master1", MASTER_SERVER_NAME, 0); sv_master[1] = Cvar_Get("sv_master2", "master.ioquake3.org", 0); for(index = 2; index < MAX_MASTER_SERVERS; index++) sv_master[index] = Cvar_Get(va("sv_master%d", index + 1), "", CVAR_ARCHIVE); sv_reconnectlimit = Cvar_Get ("sv_reconnectlimit", "3", 0); sv_showloss = Cvar_Get ("sv_showloss", "0", 0); sv_padPackets = Cvar_Get ("sv_padPackets", "0", 0); sv_killserver = Cvar_Get ("sv_killserver", "0", 0); sv_mapChecksum = Cvar_Get ("sv_mapChecksum", "", CVAR_ROM); sv_lanForceRate = Cvar_Get ("sv_lanForceRate", "1", CVAR_ARCHIVE ); sv_banFile = Cvar_Get("sv_banFile", "serverbans.dat", CVAR_ARCHIVE); sv_public = Cvar_Get("sv_public", "0", 0); Cvar_CheckRange(sv_public, -2, 1, qtrue); // initialize bot cvars so they are listed and can be set before loading the botlib SV_BotInitCvars(); // init the botlib here because we need the pre-compiler in the UI SV_BotInitBotLib(); // Load saved bans Cbuf_AddText("rehashbans\n"); }
/* ================= S_Init ================= */ void S_Init( void ) { cvar_t *cv; qboolean started = qfalse; Com_VPrintf( "------ Initializing Sound ------\n" ); //Com_VPrintf s_volume = Cvar_Get( "s_volume", "0.8", CVAR_ARCHIVE ); s_musicVolume = Cvar_Get( "s_musicvolume", "0.25", CVAR_ARCHIVE ); s_muted = Cvar_Get("s_muted", "0", CVAR_ROM); s_doppler = Cvar_Get( "s_doppler", "1", CVAR_ARCHIVE ); s_backend = Cvar_Get( "s_backend", "", CVAR_ROM ); s_muteWhenMinimized = Cvar_Get( "s_muteWhenMinimized", "0", CVAR_ARCHIVE ); s_muteWhenUnfocused = Cvar_Get( "s_muteWhenUnfocused", "0", CVAR_ARCHIVE ); //muff s_ambientLoopVolume = Cvar_Get( "s_ambientLoopVolume", "0.75", CVAR_ARCHIVE ); Cvar_CheckRange( s_ambientLoopVolume, 0, 1, qfalse ); s_ambientVolume = Cvar_Get( "s_ambientVolume", "0.75", CVAR_ARCHIVE ); Cvar_CheckRange( s_ambientVolume, 0, 1, qfalse ); s_announcerVolume = Cvar_Get( "s_announcerVolume", "0.75", CVAR_ARCHIVE ); Cvar_CheckRange( s_announcerVolume, 0, 1, qfalse ); s_menuMusicVolume = Cvar_Get( "s_menuMusicVolume", "0.25", CVAR_ARCHIVE ); Cvar_CheckRange( s_menuMusicVolume, 0, 1, qfalse ); //-muff cv = Cvar_Get( "s_initsound", "1", 0 ); if( !cv->integer ) { Com_Printf( "Sound disabled.\n" ); } else { S_CodecInit( ); Cmd_AddCommand( "play", S_Play_f ); Cmd_AddCommand( "music", S_Music_f ); Cmd_AddCommand( "stopmusic", S_StopMusic_f ); Cmd_AddCommand( "s_list", S_SoundList ); Cmd_AddCommand( "s_stop", S_StopAllSounds ); Cmd_AddCommand( "s_info", S_SoundInfo ); cv = Cvar_Get( "s_useOpenAL", "0", CVAR_ARCHIVE ); if( cv->integer ) { //OpenAL started = S_AL_Init( &si ); Cvar_Set( "s_backend", "OpenAL" ); } if( !started ) { started = S_Base_Init( &si ); Cvar_Set( "s_backend", "base" ); } if( started ) { if( !S_ValidSoundInterface( &si ) ) { Com_Error( ERR_FATAL, "Sound interface invalid" ); } if ( com_verbose->integer ) S_SoundInfo(); Com_VPrintf( "Sound initialization successful.\n" ); //Com_VPrintf } else { Com_Printf( "Sound initialization failed.\n" ); } } Com_VPrintf( "-------------------------------\n"); //Com_VPrintf }
/* =============== SV_Init Only called at main exe startup, not for each game =============== */ void SV_Init (void) { int index; SV_AddOperatorCommands (); // serverinfo vars Cvar_Get ("dmflags", "0", CVAR_SERVERINFO); Cvar_Get ("fraglimit", "20", CVAR_SERVERINFO); Cvar_Get ("timelimit", "0", CVAR_SERVERINFO); sv_gametype = Cvar_Get ("g_gametype", "0", CVAR_SERVERINFO | CVAR_LATCH ); Cvar_Get ("sv_keywords", "", CVAR_SERVERINFO); sv_mapname = Cvar_Get ("mapname", "nomap", CVAR_SERVERINFO | CVAR_ROM); sv_privateClients = Cvar_Get ("sv_privateClients", "0", CVAR_SERVERINFO); sv_hostname = Cvar_Get ("sv_hostname", "noname", CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_maxclients = Cvar_Get( "sv_maxclients", "16", CVAR_SERVERINFO | CVAR_LATCH ); Cvar_CheckRange( sv_maxclients, 1, 64, qtrue ); sv_minRate = Cvar_Get ("sv_minRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxRate = Cvar_Get ("sv_maxRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_dlRate = Cvar_Get("sv_dlRate", "100", CVAR_ARCHIVE | CVAR_SERVERINFO); sv_minPing = Cvar_Get ("sv_minPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxPing = Cvar_Get ("sv_maxPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_floodProtect = Cvar_Get ("sv_floodProtect", "1", CVAR_ARCHIVE | CVAR_SERVERINFO ); // systeminfo Cvar_Get ("sv_cheats", "0", CVAR_SYSTEMINFO | CVAR_ROM ); sv_serverid = Cvar_Get ("sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM ); sv_pure = Cvar_Get( "sv_pure", "0", CVAR_SYSTEMINFO ); Cvar_CheckRange( sv_pure, 0, 1, qtrue ); #ifdef USE_VOIP sv_voip = Cvar_Get("sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH); Cvar_CheckRange(sv_voip, 0, 1, qtrue); #endif Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_referencedPaks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_referencedPakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); // server vars sv_rconPassword = Cvar_Get ("rconPassword", "", CVAR_TEMP ); sv_privatePassword = Cvar_Get ("sv_privatePassword", "", CVAR_TEMP ); sv_fps = Cvar_Get ("sv_fps", "40", CVAR_TEMP ); //default changed Cvar_CheckRange( sv_fps, 20, 160, qtrue ); sv_timeout = Cvar_Get ("sv_timeout", "200", CVAR_TEMP ); sv_zombietime = Cvar_Get ("sv_zombietime", "2", CVAR_TEMP ); Cvar_Get ("nextmap", "", CVAR_TEMP ); sv_allowDownload = Cvar_Get ("sv_allowDownload", "0", CVAR_SERVERINFO); Cvar_Get ("sv_dlURL", "", CVAR_SERVERINFO | CVAR_ARCHIVE); sv_master[0] = Cvar_Get("sv_master1", MASTER_SERVER_NAME, 0); sv_master[1] = Cvar_Get("sv_master2", "master.ioquake3.org", 0); for(index = 2; index < MAX_MASTER_SERVERS; index++) sv_master[index] = Cvar_Get(va("sv_master%d", index + 1), "", CVAR_ARCHIVE); sv_reconnectlimit = Cvar_Get ("sv_reconnectlimit", "3", 0); sv_showloss = Cvar_Get ("sv_showloss", "0", 0); sv_padPackets = Cvar_Get ("sv_padPackets", "0", 0); sv_killserver = Cvar_Get ("sv_killserver", "0", 0); sv_mapChecksum = Cvar_Get ("sv_mapChecksum", "", CVAR_ROM); sv_lanForceRate = Cvar_Get ("sv_lanForceRate", "1", CVAR_ARCHIVE ); #ifndef STANDALONE sv_strictAuth = Cvar_Get ("sv_strictAuth", "1", CVAR_ARCHIVE ); #endif sv_banFile = Cvar_Get("sv_banFile", "serverbans.dat", CVAR_ARCHIVE); //muff sv_entList_dump = Cvar_Get( "sv_entList_dump", "0", 0 ); Cvar_CheckRange( sv_entList_dump, 0, 2, qtrue ); sv_entList_load = Cvar_Get( "sv_entList_load", "1", 0 ); Cvar_CheckRange( sv_entList_load, 0, 1, qtrue ); sv_floodProtect_decay = Cvar_Get( "sv_floodProtect_decay", "1000", 0 ); sv_floodProtect_kick = Cvar_Get( "sv_floodProtect_kick", "0", 0 ); Cvar_CheckRange( sv_floodProtect_kick, 0, 1, qtrue ); sv_floodProtect_maxcount = Cvar_Get( "sv_floodProtect_maxcount", "10", 0 ); sv_floodProtect_threshold = Cvar_Get( "sv_floodProtect_threshold", "500", 0 ); sv_loadMapCfgs = Cvar_Get( "sv_loadMapCfgs", "0", 0 ); Cvar_CheckRange( sv_loadMapCfgs, 0, 1, qtrue ); sv_mapcycle_enable = Cvar_Get( "sv_mapcycle_enable", "1", 0 ); Cvar_CheckRange( sv_mapcycle_enable, 0, 1, qtrue ); sv_mapcycle_file = Cvar_Get( "sv_mapcycle_file", "mapcycle-default", 0 ); sv_mapcycle_order = Cvar_Get( "sv_mapcycle_order", "3", 0 ); Cvar_CheckRange( sv_mapcycle_order, 0, 3, qtrue ); //-muff // initialize bot cvars so they are listed and can be set before loading the botlib SV_BotInitCvars(); // init the botlib here because we need the pre-compiler in the UI SV_BotInitBotLib(); // Load saved bans Cbuf_AddText("rehashbans\n"); }
void SV_Init (void) { SV_AddOperatorCommands (); // serverinfo vars Cvar_Get ("dmflags", "0", CVAR_SERVERINFO); Cvar_Get ("fraglimit", "20", CVAR_SERVERINFO); Cvar_Get ("timelimit", "0", CVAR_SERVERINFO); sv_gametype = Cvar_Get ("g_gametype", "0", CVAR_SERVERINFO | CVAR_LATCH ); Cvar_Get ("sv_keywords", "", CVAR_SERVERINFO); Cvar_Get ("protocol", va("%i", 71), CVAR_SERVERINFO | CVAR_ROM); sv_mapname = Cvar_Get ("mapname", "nomap", CVAR_SERVERINFO | CVAR_ROM); sv_privateClients = Cvar_Get ("sv_privateClients", "0", CVAR_SERVERINFO); sv_hostname = Cvar_Get ("sv_hostname", "noname", CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_maxclients = Cvar_Get ("sv_maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH); sv_minRate = Cvar_Get ("sv_minRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxRate = Cvar_Get ("sv_maxRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_minPing = Cvar_Get ("sv_minPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxPing = Cvar_Get ("sv_maxPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_floodProtect = Cvar_Get ("sv_floodProtect", "1", CVAR_ARCHIVE | CVAR_SERVERINFO ); // systeminfo Cvar_Get ("sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM ); sv_serverid = Cvar_Get ("sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM ); sv_pure = Cvar_Get ("sv_pure", "1", CVAR_SYSTEMINFO ); #ifdef USE_VOIP sv_voip = Cvar_Get ("sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH); Cvar_CheckRange( sv_voip, 0, 1, qtrue ); #endif Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_referencedPaks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get ("sv_referencedPakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); // server vars sv_rconPassword = Cvar_Get ("rconPassword", "", CVAR_TEMP ); sv_privatePassword = Cvar_Get ("sv_privatePassword", "", CVAR_TEMP ); sv_fps = Cvar_Get ("sv_fps", "20", CVAR_TEMP ); sv_timeout = Cvar_Get ("sv_timeout", "200", CVAR_TEMP ); sv_zombietime = Cvar_Get ("sv_zombietime", "2", CVAR_TEMP ); Cvar_Get ("nextmap", "", CVAR_TEMP ); sv_allowDownload = Cvar_Get ("sv_allowDownload", "0", CVAR_SERVERINFO); Cvar_Get ("sv_dlURL", "", CVAR_SERVERINFO | CVAR_ARCHIVE); sv_master[0] = Cvar_Get ("sv_master1", MASTER_SERVER_NAME, 0 ); sv_master[1] = Cvar_Get ("sv_master2", "", CVAR_ARCHIVE ); sv_master[2] = Cvar_Get ("sv_master3", "", CVAR_ARCHIVE ); sv_master[3] = Cvar_Get ("sv_master4", "", CVAR_ARCHIVE ); sv_master[4] = Cvar_Get ("sv_master5", "", CVAR_ARCHIVE ); sv_reconnectlimit = Cvar_Get ("sv_reconnectlimit", "3", 0); sv_showloss = Cvar_Get ("sv_showloss", "0", 0); sv_padPackets = Cvar_Get ("sv_padPackets", "0", 0); sv_killserver = Cvar_Get ("sv_killserver", "0", 0); sv_mapChecksum = Cvar_Get ("sv_mapChecksum", "", CVAR_ROM); sv_lanForceRate = Cvar_Get ("sv_lanForceRate", "1", CVAR_ARCHIVE ); sv_strictAuth = Cvar_Get ("sv_strictAuth", "1", CVAR_ARCHIVE ); // initialize bot cvars so they are listed and can be set before loading the botlib SV_BotInitCvars(); // init the botlib here because we need the pre-compiler in the UI SV_BotInitBotLib(); // Load saved bans Cbuf_AddText("rehashbans\n"); }
/* =============== SV_Init Only called at main exe startup, not for each game =============== */ void SV_Init( void ) { SV_AddOperatorCommands(); // serverinfo vars Cvar_Get( "timelimit", "0", CVAR_SERVERINFO ); Cvar_Get( "protocol", va( "%i", PROTOCOL_VERSION ), CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_mapname = Cvar_Get( "mapname", "nomap", CVAR_SERVERINFO | CVAR_ROM ); Cvar_Get( "layout", "", CVAR_SERVERINFO | CVAR_ROM ); sv_privateClients = Cvar_Get( "sv_privateClients", "0", CVAR_SERVERINFO ); sv_hostname = Cvar_Get( "sv_hostname", "Unnamed Unvanquished Server", CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_maxclients = Cvar_Get( "sv_maxclients", "20", CVAR_SERVERINFO | CVAR_LATCH ); // NERVE - SMF - changed to 20 from 8 sv_maxRate = Cvar_Get( "sv_maxRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_minPing = Cvar_Get( "sv_minPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxPing = Cvar_Get( "sv_maxPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_floodProtect = Cvar_Get( "sv_floodProtect", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); // systeminfo //bani - added cvar_t for sv_cheats so server engine can reference it sv_cheats = Cvar_Get( "sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM ); sv_serverid = Cvar_Get( "sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM ); #ifdef DEDICATED sv_pure = Cvar_Get( "sv_pure", "1", CVAR_SYSTEMINFO ); #else // Use OS shared libs for the client at startup. This prevents crashes due to mismatching syscall ABIs // from loading outdated vms pk3s. The correct vms pk3 will be loaded upon connecting to a pure server. sv_pure = Cvar_Get( "sv_pure", "0", CVAR_SYSTEMINFO ); #endif #ifdef USE_VOIP sv_voip = Cvar_Get( "sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH ); Cvar_CheckRange( sv_voip, 0, 1, qtrue ); #endif Cvar_Get( "sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_referencedPaks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_referencedPakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); // server vars sv_rconPassword = Cvar_Get( "rconPassword", "", CVAR_TEMP ); sv_privatePassword = Cvar_Get( "sv_privatePassword", "", CVAR_TEMP ); sv_fps = Cvar_Get( "sv_fps", "40", CVAR_TEMP ); sv_timeout = Cvar_Get( "sv_timeout", "240", CVAR_TEMP ); sv_zombietime = Cvar_Get( "sv_zombietime", "2", CVAR_TEMP ); Cvar_Get( "nextmap", "", CVAR_TEMP ); sv_allowDownload = Cvar_Get( "sv_allowDownload", "1", CVAR_ARCHIVE ); sv_master[ 0 ] = Cvar_Get( "sv_master1", MASTER_SERVER_NAME, 0 ); sv_master[ 1 ] = Cvar_Get( "sv_master2", "", CVAR_ARCHIVE ); sv_master[ 2 ] = Cvar_Get( "sv_master3", "", CVAR_ARCHIVE ); sv_master[ 3 ] = Cvar_Get( "sv_master4", "", CVAR_ARCHIVE ); sv_master[ 4 ] = Cvar_Get( "sv_master5", "", CVAR_ARCHIVE ); sv_reconnectlimit = Cvar_Get( "sv_reconnectlimit", "3", 0 ); sv_padPackets = Cvar_Get( "sv_padPackets", "0", 0 ); sv_killserver = Cvar_Get( "sv_killserver", "0", 0 ); sv_mapChecksum = Cvar_Get( "sv_mapChecksum", "", CVAR_ROM ); sv_lanForceRate = Cvar_Get( "sv_lanForceRate", "1", CVAR_ARCHIVE ); sv_showAverageBPS = Cvar_Get( "sv_showAverageBPS", "0", 0 ); // NERVE - SMF - net debugging // the download netcode tops at 18/20 kb/s, no need to make you think you can go above sv_dl_maxRate = Cvar_Get( "sv_dl_maxRate", "42000", CVAR_ARCHIVE ); sv_wwwDownload = Cvar_Get( "sv_wwwDownload", "0", CVAR_ARCHIVE ); sv_wwwBaseURL = Cvar_Get( "sv_wwwBaseURL", "", CVAR_ARCHIVE ); sv_wwwDlDisconnected = Cvar_Get( "sv_wwwDlDisconnected", "0", CVAR_ARCHIVE ); sv_wwwFallbackURL = Cvar_Get( "sv_wwwFallbackURL", "", CVAR_ARCHIVE ); //bani sv_packetdelay = Cvar_Get( "sv_packetdelay", "0", CVAR_CHEAT ); // fretn - note: redirecting of clients to other servers relies on this, // ET://someserver.com sv_fullmsg = Cvar_Get( "sv_fullmsg", "Server is full.", CVAR_ARCHIVE ); svs.serverLoad = -1; }
// Only called at main exe startup, not for each game void SV_Init( void ) { int index; // serverinfo vars sv_gametype = Cvar_Get( "sv_gametype", DEFAULT_GAMETYPE, CVAR_SERVERINFO|CVAR_LATCH, "Gametype", NULL ); Cvar_Get( "sv_keywords", "", CVAR_SERVERINFO, NULL, NULL ); sv_mapname = Cvar_Get( "mapname", "nomap", CVAR_SERVERINFO|CVAR_ROM, NULL, NULL ); sv_privateClients = Cvar_Get( "sv_privateClients", "0", CVAR_SERVERINFO, NULL, NULL ); sv_hostname = Cvar_Get( "sv_hostname", "noname", CVAR_SERVERINFO|CVAR_ARCHIVE, "Server name", NULL ); sv_maxclients = Cvar_Get( "sv_maxclients", XSTRING( MAX_CLIENTS ), CVAR_SERVERINFO|CVAR_ARCHIVE|CVAR_LATCH, NULL, NULL ); sv_minRate = Cvar_Get( "sv_minRate", "0", CVAR_ARCHIVE|CVAR_SERVERINFO, NULL, NULL ); sv_maxRate = Cvar_Get( "sv_maxRate", "0", CVAR_ARCHIVE|CVAR_SERVERINFO, NULL, NULL ); sv_dlRate = Cvar_Get( "sv_dlRate", "100", CVAR_ARCHIVE|CVAR_SERVERINFO, NULL, NULL ); sv_minPing = Cvar_Get( "sv_minPing", "0", CVAR_ARCHIVE|CVAR_SERVERINFO, NULL, NULL ); sv_maxPing = Cvar_Get( "sv_maxPing", "0", CVAR_ARCHIVE|CVAR_SERVERINFO, NULL, NULL ); sv_floodProtect = Cvar_Get( "sv_floodProtect", "1", CVAR_ARCHIVE|CVAR_SERVERINFO, NULL, NULL ); // systeminfo Cvar_Get( "sv_cheats", "1", CVAR_NONE, NULL, NULL ); sv_serverid = Cvar_Get( "sv_serverid", "0", CVAR_SYSTEMINFO|CVAR_ROM, NULL, NULL ); sv_pure = Cvar_Get( "sv_pure", "1", CVAR_SYSTEMINFO, NULL, NULL ); #ifdef USE_VOIP sv_voip = Cvar_Get( "sv_voip", "1", CVAR_SYSTEMINFO|CVAR_LATCH, NULL, NULL ); Cvar_CheckRange(sv_voip, 0, 1, qtrue); #endif Cvar_Get( "sv_paks", "", CVAR_SYSTEMINFO|CVAR_ROM, NULL, NULL ); Cvar_Get( "sv_pakNames", "", CVAR_SYSTEMINFO|CVAR_ROM, NULL, NULL ); Cvar_Get( "sv_referencedPaks", "", CVAR_SYSTEMINFO|CVAR_ROM, NULL, NULL ); Cvar_Get( "sv_referencedPakNames", "", CVAR_SYSTEMINFO|CVAR_ROM, NULL, NULL ); // server vars sv_rconPassword = Cvar_Get( "rconPassword", "", CVAR_TEMP, "Password for remote console access", NULL ); sv_privatePassword = Cvar_Get( "sv_privatePassword", "", CVAR_TEMP, NULL, NULL ); sv_snapshotRate = Cvar_Get( "sv_snapshotRate", "25", CVAR_ARCHIVE, "How often clients receive snapshots", NULL ); // 1 <=> sv_snapshotRate <=> 1000/sv_frametime->integer sv_frametime = Cvar_Get( "sv_frametime", "25", CVAR_ARCHIVE, "Server update rate", NULL ); sv_timeout = Cvar_Get( "sv_timeout", "200", CVAR_TEMP, NULL, NULL ); sv_zombietime = Cvar_Get( "sv_zombietime", "2", CVAR_TEMP, NULL, NULL ); Cvar_Get( "nextmap", "", CVAR_TEMP, NULL, NULL ); sv_allowDownload = Cvar_Get( "sv_allowDownload", "0", CVAR_SERVERINFO, NULL, NULL ); Cvar_Get( "sv_dlURL", "", CVAR_SERVERINFO|CVAR_ARCHIVE, NULL, NULL ); sv_master[0] = Cvar_Get( "sv_master1", MASTER_SERVER_NAME, CVAR_NONE, NULL, NULL ); for ( index=1; index<MAX_MASTER_SERVERS; index++ ) sv_master[index] = Cvar_Get( va( "sv_master%d", index+1 ), "", CVAR_ARCHIVE, NULL, NULL ); sv_reconnectlimit = Cvar_Get( "sv_reconnectlimit", "3", CVAR_NONE, NULL, NULL ); sv_showloss = Cvar_Get( "sv_showloss", "0", CVAR_NONE, NULL, NULL ); sv_padPackets = Cvar_Get( "sv_padPackets", "0", CVAR_NONE, NULL, NULL ); sv_killserver = Cvar_Get( "sv_killserver", "0", CVAR_NONE, NULL, NULL ); sv_mapChecksum = Cvar_Get( "sv_mapChecksum", "", CVAR_ROM, NULL, NULL ); sv_lanForceRate = Cvar_Get( "sv_lanForceRate", "1", CVAR_ARCHIVE, NULL, NULL ); sv_banFile = Cvar_Get( "sv_banFile", "serverbans.dat", CVAR_ARCHIVE, NULL, NULL ); // from common, should be read-only cl_paused = Cvar_Get( "cl_paused", "0", CVAR_ROM, NULL, NULL ); com_cl_running = Cvar_Get( "cl_running", "0", CVAR_ROM, NULL, NULL ); #ifdef DEDICATED com_dedicated = Cvar_Get( "dedicated", "2", CVAR_INIT, NULL, NULL ); Cvar_CheckRange( com_dedicated, 1, 2, qtrue ); #else com_dedicated = Cvar_Get( "dedicated", "0", CVAR_LATCH, NULL, NULL); Cvar_CheckRange( com_dedicated, 0, 2, qtrue ); #endif com_gamename = Cvar_Get( "com_gamename", GAMENAME_FOR_MASTER, CVAR_SERVERINFO|CVAR_INIT, NULL, NULL ); com_protocol = Cvar_Get( "com_protocol", XSTRING( PROTOCOL_VERSION ), CVAR_SERVERINFO|CVAR_INIT, NULL, NULL ); com_speeds = Cvar_Get( "com_speeds", "0", CVAR_NONE, NULL, NULL ); com_sv_running = Cvar_Get( "sv_running", "0", CVAR_ROM, NULL, NULL ); com_timescale = Cvar_Get( "timescale", "1", CVAR_CHEAT|CVAR_SYSTEMINFO, NULL, NULL ); sv_paused = Cvar_Get( "sv_paused", "0", CVAR_ROM, NULL, NULL ); // end common SV_AddOperatorCommands(); // initialize bot cvars so they are listed and can be set before loading the botlib SV_BotInitCvars(); // init the botlib here because we need the pre-compiler in the UI SV_BotInitBotLib(); // Load saved bans Cbuf_AddText("rehashbans\n"); }
/* =============== SV_Init Only called at main exe startup, not for each game =============== */ void SV_Init( void ) { int index; SV_InitServerAPI(); SV_AddOperatorCommands(); // serverinfo vars Cvar_Get( "dmflags", "0", CVAR_SERVERINFO ); Cvar_Get( "fraglimit", "20", CVAR_SERVERINFO ); Cvar_Get( "timelimit", "0", CVAR_SERVERINFO ); sv_gametype = Cvar_Get( "g_gametype", "0", CVAR_SERVERINFO | CVAR_LATCH ); Cvar_Get( "sv_keywords", "", CVAR_SERVERINFO ); sv_mapname = Cvar_Get( "mapname", "nomap", CVAR_SERVERINFO | CVAR_ROM ); sv_privateClients = Cvar_Get( "sv_privateClients", "0", CVAR_SERVERINFO ); sv_hostname = Cvar_Get( "sv_hostname", "noname", CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_maxclients = Cvar_Get( "sv_maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH ); sv_minRate = Cvar_Get( "sv_minRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxRate = Cvar_Get( "sv_maxRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_dlRate = Cvar_Get( "sv_dlRate", "100", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_minPing = Cvar_Get( "sv_minPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxPing = Cvar_Get( "sv_maxPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_floodProtect = Cvar_Get( "sv_floodProtect", "1", CVAR_ARCHIVE | CVAR_SERVERINFO ); // systeminfo Cvar_Get( "sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM ); sv_serverid = Cvar_Get( "sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM ); sv_pure = Cvar_Get( "sv_pure", "0", CVAR_SYSTEMINFO ); #ifdef USE_VOIP sv_voip = Cvar_Get( "sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH ); Cvar_CheckRange( sv_voip, 0, 1, true ); #endif Cvar_Get( "sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_referencedPaks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_referencedPakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); // server vars sv_rconPassword = Cvar_Get( "rconPassword", "", CVAR_TEMP ); sv_privatePassword = Cvar_Get( "sv_privatePassword", "", CVAR_TEMP ); sv_fps = Cvar_Get( "sv_fps", "20", CVAR_TEMP ); sv_timeout = Cvar_Get( "sv_timeout", "200", CVAR_TEMP ); sv_zombietime = Cvar_Get( "sv_zombietime", "2", CVAR_TEMP ); Cvar_Get( "nextmap", "", CVAR_TEMP ); sv_allowDownload = Cvar_Get( "sv_allowDownload", "1", CVAR_SERVERINFO ); Cvar_Get( "sv_dlURL", "", CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_master[0] = Cvar_Get( "sv_master1", MASTER_SERVER_NAME, 0 ); sv_master[1] = Cvar_Get( "sv_master2", "master.ioquake3.org", 0 ); for ( index = 2; index < MAX_MASTER_SERVERS; index++ ) sv_master[index] = Cvar_Get( va( "sv_master%d", index + 1 ), "", CVAR_ARCHIVE ); sv_reconnectlimit = Cvar_Get( "sv_reconnectlimit", "3", 0 ); sv_showloss = Cvar_Get( "sv_showloss", "0", 0 ); sv_padPackets = Cvar_Get( "sv_padPackets", "0", 0 ); sv_killserver = Cvar_Get( "sv_killserver", "0", 0 ); sv_mapChecksum = Cvar_Get( "sv_mapChecksum", "", CVAR_ROM ); sv_lanForceRate = Cvar_Get( "sv_lanForceRate", "1", CVAR_ARCHIVE ); sv_banFile = Cvar_Get( "sv_banFile", "serverbans.dat", CVAR_ARCHIVE ); // Load saved bans Cbuf_AddText( "rehashbans\n" ); }
/* =============== SV_Init Only called at main exe startup, not for each game =============== */ void SV_Init( void ) { int index; SV_AddOperatorCommands(); // serverinfo vars Cvar_Get( "dmflags", "0", /*CVAR_SERVERINFO*/ 0 ); Cvar_Get( "fraglimit", "0", /*CVAR_SERVERINFO*/ 0 ); Cvar_Get( "timelimit", "0", CVAR_SERVERINFO ); // DHM - Nerve :: default to GT_WOLF sv_gametype = Cvar_Get( "g_gametype", "5", CVAR_SERVERINFO | CVAR_LATCH ); // Rafael gameskill sv_gameskill = Cvar_Get( "g_gameskill", "3", CVAR_SERVERINFO | CVAR_LATCH ); // done Cvar_Get( "sv_keywords", "", CVAR_SERVERINFO ); sv_mapname = Cvar_Get( "mapname", "nomap", CVAR_SERVERINFO | CVAR_ROM ); sv_privateClients = Cvar_Get( "sv_privateClients", "0", CVAR_SERVERINFO ); sv_hostname = Cvar_Get( "sv_hostname", "WolfHost", CVAR_SERVERINFO | CVAR_ARCHIVE ); sv_maxclients = Cvar_Get( "sv_maxclients", "20", CVAR_SERVERINFO | CVAR_LATCH ); // NERVE - SMF - changed to 20 from 8 sv_minRate = Cvar_Get ("sv_minRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxRate = Cvar_Get( "sv_maxRate", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_dlRate = Cvar_Get("sv_dlRate", "100", CVAR_ARCHIVE | CVAR_SERVERINFO); sv_minPing = Cvar_Get( "sv_minPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_maxPing = Cvar_Get( "sv_maxPing", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_floodProtect = Cvar_Get( "sv_floodProtect", "1", CVAR_ARCHIVE | CVAR_SERVERINFO ); sv_allowAnonymous = Cvar_Get( "sv_allowAnonymous", "0", CVAR_SERVERINFO ); sv_friendlyFire = Cvar_Get( "g_friendlyFire", "1", CVAR_SERVERINFO | CVAR_ARCHIVE ); // NERVE - SMF sv_maxlives = Cvar_Get( "g_maxlives", "0", CVAR_ARCHIVE | CVAR_LATCH | CVAR_SERVERINFO ); // NERVE - SMF sv_tourney = Cvar_Get( "g_noTeamSwitching", "0", CVAR_ARCHIVE ); // NERVE - SMF // systeminfo Cvar_Get( "sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM ); sv_serverid = Cvar_Get( "sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM ); sv_pure = Cvar_Get( "sv_pure", "1", CVAR_SYSTEMINFO ); #ifdef USE_VOIP sv_voip = Cvar_Get("sv_voip", "1", CVAR_LATCH); Cvar_CheckRange(sv_voip, 0, 1, qtrue); sv_voipProtocol = Cvar_Get("sv_voipProtocol", sv_voip->integer ? "opus" : "", CVAR_SYSTEMINFO | CVAR_ROM ); #endif Cvar_Get( "sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_referencedPaks", "", CVAR_SYSTEMINFO | CVAR_ROM ); Cvar_Get( "sv_referencedPakNames", "", CVAR_SYSTEMINFO | CVAR_ROM ); #if defined ANTIWALLHACK awh_active = Cvar_Get("awh_active", "0", CVAR_SYSTEMINFO); awh_bbox_horz = Cvar_Get("awh_bbox_horz", "30", CVAR_SYSTEMINFO); awh_bbox_vert = Cvar_Get("awh_bbox_vert", "60", CVAR_SYSTEMINFO); AWH_Init(); #endif // server vars sv_rconPassword = Cvar_Get( "rconPassword", "", CVAR_TEMP ); sv_privatePassword = Cvar_Get( "sv_privatePassword", "", CVAR_TEMP ); #ifndef UPDATE_SERVER sv_fps = Cvar_Get( "sv_fps", "20", CVAR_TEMP ); #else sv_fps = Cvar_Get( "sv_fps", "60", CVAR_TEMP ); // this allows faster downloads #endif sv_timeout = Cvar_Get( "sv_timeout", "240", CVAR_TEMP ); sv_zombietime = Cvar_Get( "sv_zombietime", "2", CVAR_TEMP ); Cvar_Get( "nextmap", "", CVAR_TEMP ); sv_allowDownload = Cvar_Get( "sv_allowDownload", "1", CVAR_ARCHIVE ); Cvar_Get ("sv_dlURL", "", CVAR_SERVERINFO | CVAR_ARCHIVE); sv_master[0] = Cvar_Get("sv_master1", MASTER_SERVER_NAME, 0); sv_master[1] = Cvar_Get("sv_master2", "master.ioquake3.org", 0); for(index = 2; index < MAX_MASTER_SERVERS; index++) sv_master[index] = Cvar_Get(va("sv_master%d", index + 1), "", CVAR_ARCHIVE); sv_reconnectlimit = Cvar_Get( "sv_reconnectlimit", "3", 0 ); sv_showloss = Cvar_Get( "sv_showloss", "0", 0 ); sv_padPackets = Cvar_Get( "sv_padPackets", "0", 0 ); sv_killserver = Cvar_Get( "sv_killserver", "0", 0 ); sv_mapChecksum = Cvar_Get( "sv_mapChecksum", "", CVAR_ROM ); sv_lanForceRate = Cvar_Get( "sv_lanForceRate", "1", CVAR_ARCHIVE ); sv_banFile = Cvar_Get("sv_banFile", "serverbans.dat", CVAR_ARCHIVE); sv_levelTimeReset = Cvar_Get( "sv_levelTimeReset", "0", CVAR_ARCHIVE ); sv_onlyVisibleClients = Cvar_Get( "sv_onlyVisibleClients", "0", 0 ); // DHM - Nerve sv_showAverageBPS = Cvar_Get( "sv_showAverageBPS", "0", 0 ); // NERVE - SMF - net debugging // NERVE - SMF - create user set cvars Cvar_Get( "g_userTimeLimit", "0", 0 ); Cvar_Get( "g_userAlliedRespawnTime", "0", 0 ); Cvar_Get( "g_userAxisRespawnTime", "0", 0 ); Cvar_Get( "g_maxlives", "0", 0 ); Cvar_Get( "g_noTeamSwitching", "0", CVAR_ARCHIVE ); Cvar_Get( "g_altStopwatchMode", "0", CVAR_ARCHIVE ); Cvar_Get( "g_minGameClients", "8", CVAR_SERVERINFO ); Cvar_Get( "g_complaintlimit", "3", CVAR_ARCHIVE ); Cvar_Get( "gamestate", "-1", CVAR_WOLFINFO | CVAR_ROM ); Cvar_Get( "g_currentRound", "0", CVAR_WOLFINFO ); Cvar_Get( "g_nextTimeLimit", "0", CVAR_WOLFINFO ); // -NERVE - SMF // TTimo - some UI additions // NOTE: sucks to have this hardcoded really, I suppose this should be in UI Cvar_Get( "g_axismaxlives", "0", 0 ); Cvar_Get( "g_alliedmaxlives", "0", 0 ); Cvar_Get( "g_fastres", "0", CVAR_ARCHIVE ); Cvar_Get( "g_fastResMsec", "1000", CVAR_ARCHIVE ); // ATVI Tracker Wolfenstein Misc #273 Cvar_Get( "g_voteFlags", "255", CVAR_ARCHIVE | CVAR_SERVERINFO ); // ATVI Tracker Wolfenstein Misc #263 Cvar_Get( "g_antilag", "0", CVAR_ARCHIVE | CVAR_SERVERINFO ); // TTimo - autodownload speed tweaks #ifndef UPDATE_SERVER // the download netcode tops at 18/20 kb/s, no need to make you think you can go above sv_dl_maxRate = Cvar_Get( "sv_dl_maxRate", "42000", CVAR_ARCHIVE ); #else // the update server is on steroids, sv_fps 60 and no snapshotMsec limitation, it can go up to 30 kb/s sv_dl_maxRate = Cvar_Get( "sv_dl_maxRate", "60000", CVAR_ARCHIVE ); #endif // initialize bot cvars so they are listed and can be set before loading the botlib SV_BotInitCvars(); // init the botlib here because we need the pre-compiler in the UI SV_BotInitBotLib(); // DHM - Nerve #ifdef UPDATE_SERVER SV_Startup(); SV_ParseVersionMapping(); // serverid should be different each time sv.serverId = com_frameTime + 100; sv.restartedServerId = sv.serverId; // I suppose the init here is just to be safe sv.checksumFeedServerId = sv.serverId; Cvar_Set( "sv_serverid", va( "%i", sv.serverId ) ); Cvar_Set( "mapname", "Update" ); // allocate empty config strings { int i; for ( i = 0 ; i < MAX_CONFIGSTRINGS ; i++ ) { sv.configstrings[i] = CopyString( "" ); } } #endif // Load saved bans Cbuf_AddText("rehashbans\n"); }