// 2000-04-30 NVS HANDSHAKE SRV<->CL/QC<->CL by Maddes qboolean NVS_RejectClient (void) { // check client against required version if (host_client->nvs_cmax < nvs_required->value) // client not compliant { Con_DPrintf ("Client rejected! His executable/settings doesn't support the required NVS version.\n"); // tell client and force him to disconnect SV_ClientPrintf ("\nRejected! Your executable/settings doesn't support the required NVS version.\n\n"); cmd_source = src_client; Host_Version_f (); SV_DropClient (false); return true; } return false; }
/* ==================== Host_Init ==================== */ void Host_Init (quakeparms_t *parms) { if (standard_quake) minimum_memory = MINIMUM_MEMORY; else minimum_memory = MINIMUM_MEMORY_LEVELPAK; if (COM_CheckParm ("-minmemory")) parms->memsize = minimum_memory; host_parms = *parms; if (parms->memsize < minimum_memory) Sys_Error ("Only %4.1f megs of memory available, can't execute game", parms->memsize / (float)0x100000); com_argc = parms->argc; com_argv = parms->argv; Memory_Init (parms->membase, parms->memsize); Cbuf_Init (); Cmd_Init (); V_Init (); Chase_Init (); Host_InitVCR (parms); COM_Init (parms->basedir); Host_InitLocal (); W_LoadWadFile ("gfx.wad"); Key_Init (); Con_Init (); M_Init (); PR_Init (); Mod_Init (); NET_Init (); SV_Init (); Host_Version_f(); Con_Printf ("%4.1f megabyte heap\n",parms->memsize/ (1024*1024.0)); R_InitTextures (); // needed even for dedicated servers if (cls.state != ca_dedicated) { host_basepal = (byte *)COM_LoadHunkFile ("gfx/palette.lmp"); if (!host_basepal) Sys_Error ("Couldn't load gfx/palette.lmp"); host_colormap = (byte *)COM_LoadHunkFile ("gfx/colormap.lmp"); if (!host_colormap) Sys_Error ("Couldn't load gfx/colormap.lmp"); #ifndef _WIN32 // on non win32, mouse comes before video for security reasons IN_Init (); #endif VID_Init (host_basepal); Draw_Init (); SCR_Init (); R_Init (); #ifndef _WIN32 // on Win32, sound initialization has to come before video initialization, so we // can put up a popup if the sound hardware is in use S_Init (); #else #ifdef GLQUAKE // FIXME: doesn't use the new one-window approach yet S_Init (); #endif #endif // _WIN32 CDAudio_Init (); Sbar_Init (); CL_Init (); #ifdef _WIN32 // on non win32, mouse comes before video for security reasons IN_Init (); #endif } Cbuf_InsertText ("exec quake.rc\n"); Hunk_AllocName (0, "-HOST_HUNKLEVEL-"); host_hunklevel = Hunk_LowMark (); host_initialized = true; Sys_Printf ("======== %s Initialized=========\n", ENGINE_NAME); }