这篇教程C++ CL_Disconnect函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CL_Disconnect函数的典型用法代码示例。如果您正苦于以下问题:C++ CL_Disconnect函数的具体用法?C++ CL_Disconnect怎么用?C++ CL_Disconnect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CL_Disconnect函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CL_PlayDemo_f/*====================CL_PlayDemo_fplay [demoname]====================*/void CL_PlayDemo_f (void){ char name[256]; if (Cmd_Argc() != 2) { Con_Printf ("play <demoname> : plays a demo/n"); return; }//// disconnect from server// CL_Disconnect (); //// open the demo file// strcpy (name, Cmd_Argv(1)); COM_DefaultExtension (name, ".qwd"); Con_Printf ("Playing demo from %s./n", name); COM_FOpenFile (name, &cls.demofile); if (!cls.demofile) { Con_Printf ("ERROR: couldn't open./n"); cls.demonum = -1; // stop demo loop return; } cls.demoplayback = true; cls.state = ca_demostart; Netchan_Setup (&cls.netchan, net_from, 0); realtime = 0;}
开发者ID:MaddTheSane,项目名称:Quake,代码行数:42,
示例2: Host_EndGame/*================Host_EndGame================*/void Host_EndGame (char *message, ...){ va_list argptr; char string[1024]; va_start (argptr,message); vsnprintf(string, sizeof(string), message,argptr); va_end (argptr); Con_DPrintf ("Host_EndGame: %s/n",string); if (sv.active) Host_ShutdownServer (false); if (cls.state == ca_dedicated) Sys_Error ("Host_EndGame: %s/n",string); // dedicated servers exit if (cls.demonum != -1) { CL_StopPlayback (); // JPG 1.05 - patch by CSR to fix crash CL_NextDemo (); } else CL_Disconnect (); longjmp (host_abortserver, 1);}
开发者ID:darkduke606,项目名称:Insomnia-ProQuake-Engine,代码行数:31,
示例3: Host_Error/** * This shuts down both the client and server */void Host_Error(const char *error, ...) { va_list argptr; char string[1024]; static bool inerror = false; if (inerror) Sys_Error("Host_Error: recursively entered"); inerror = true; SCR_EndLoadingPlaque(); // reenable screen updates va_start(argptr, error); vsprintf(string, error, argptr); va_end(argptr); Con_Printf("Host_Error: %s/n", string); if (sv.active) Host_ShutdownServer(false); if (cls.state == ca_dedicated) Sys_Error("Host_Error: %s/n", string); // dedicated servers exit CL_Disconnect(); cls.demonum = -1; inerror = false; longjmp(host_abortserver, 1);}
开发者ID:DrLabman,项目名称:QMB,代码行数:32,
示例4: Host_ShutdownServer/*==================Host_ShutdownServerThis only happens at the end of a game, not between levels==================*/void Host_ShutdownServer(qboolean crash){ int i, count; sizebuf_t buf; unsigned char message[4]; double start; if (!sv.active) return; sv.active = false;// stop all client sounds immediately if (cls.state == ca_connected) CL_Disconnect ();// flush any pending messages - like the score!!! start = Sys_DoubleTime(); do { count = 0; for (i=0, host_client = svs.clients ; i<svs.maxclients ; i++, host_client++) { if (host_client->active && host_client->message.cursize) { if (NET_CanSendMessage (host_client->netconnection)) { NET_SendMessage(host_client->netconnection, &host_client->message); SZ_Clear (&host_client->message); } else { NET_GetMessage(host_client->netconnection); count++; } } } if ((Sys_DoubleTime() - start) > 3.0) break; } while (count);// make sure all the clients know we're disconnecting buf.data = message; buf.maxsize = 4; buf.cursize = 0; MSG_WriteByte(&buf, svc_disconnect); count = NET_SendToAll(&buf, 5); if (count) Con_Printf("Host_ShutdownServer: NET_SendToAll failed for %u clients/n", count); for (i=0, host_client = svs.clients ; i<svs.maxclients ; i++, host_client++) if (host_client->active) SV_DropClient(crash);//// clear structures// memset (&sv, 0, sizeof(sv)); memset (svs.clients, 0, svs.maxclientslimit*sizeof(client_t));}
开发者ID:darkduke606,项目名称:Insomnia-ProQuake-Engine,代码行数:67,
示例5: Host_EndGame/*================Host_EndGame================*/void Host_EndGame (char *message, ...){ va_list argptr; char* string = Sys_BigStackAlloc(1024, "Host_EndGame"); va_start (argptr,message); vsprintf (string,message,argptr); va_end (argptr); Con_DPrintf ("Host_EndGame: %s/n",string); if (sv.active) Host_ShutdownServer (false); if (cls.state == ca_dedicated) Sys_Error ("Host_EndGame: %s/n",string); // dedicated servers exit Sys_BigStackFree(1024, "Host_EndGame"); if (cls.demonum != -1) { CL_StopPlayback(); CL_NextDemo(); } else CL_Disconnect (); longjmp (host_abortserver, 1);}
开发者ID:Rinnegatamante,项目名称:vitaQuake,代码行数:33,
示例6: Host_Error/*================Host_ErrorThis shuts down both the client and server================*/void Host_Error (const char *error, ...){ va_list argptr; char string[1024]; static qboolean inerror = false; if (inerror) Sys_Error ("Host_Error: recursively entered"); inerror = true; SCR_EndLoadingPlaque (); // reenable screen updates va_start (argptr,error); q_vsnprintf (string, sizeof(string), error, argptr); va_end (argptr); Con_Printf ("Host_Error: %s/n",string); if (sv.active) Host_ShutdownServer (false); if (cls.state == ca_dedicated) Sys_Error ("Host_Error: %s/n",string); // dedicated servers exit CL_Disconnect (); cls.demonum = -1; cl.intermission = 0; //johnfitz -- for errors during intermissions (changelevel with no map found, etc.) inerror = false; longjmp (host_abortserver, 1);}
开发者ID:bangstk,项目名称:Quakespasm,代码行数:38,
示例7: CL_DemoCompleted/*=================CL_DemoCompleted=================*/void CL_DemoCompleted(void){#if NEW_DEMOFUNC CL_FreeDemoPoints();#endif if (cl_timedemo && cl_timedemo->integer) { int time; time = Sys_Milliseconds() - clc.timeDemoStart; if (time > 0) { Com_FuncPrinf("%i frames, %3.1f seconds: %3.1f fps/n", clc.timeDemoFrames, time / 1000.0, clc.timeDemoFrames * 1000.0 / time); } } if (CL_VideoRecording()) { Cmd_ExecuteString("stopvideo"); } if (clc.waverecording) { CL_WriteWaveClose(); clc.waverecording = qfalse; } CL_Disconnect(qtrue); CL_NextDemo();}
开发者ID:dstaesse,项目名称:etlegacy,代码行数:37,
示例8: __declspec/* <36123> ../engine/host.c:255 */void __declspec(noreturn) Host_Error(const char *error, ...){ va_list argptr; char string[1024]; static qboolean inerror = FALSE; va_start(argptr, error); if (inerror) Sys_Error("Host_Error: recursively entered"); inerror = TRUE; SCR_EndLoadingPlaque(); Q_vsnprintf(string, sizeof(string), error, argptr); va_end(argptr); if (g_psv.active && developer.value != 0.0 ) CL_WriteMessageHistory(0, 0); Con_Printf("Host_Error: %s/n", string); if (g_psv.active) Host_ShutdownServer(FALSE); if (g_pcls.state) { CL_Disconnect(); g_pcls.demonum = -1; inerror = FALSE; longjmp(host_abortserver, 1); } Sys_Error("Host_Error: %s/n", string);}
开发者ID:mefisto2009,项目名称:rehlds,代码行数:33,
示例9: CL_MapLoading/*=====================CL_MapLoadingA local server is starting to load a map, so update thescreen to let the user know about it, then dump all clientmemory on the hunk from cgame, ui, and renderer=====================*/void CL_MapLoading( void ) { if ( !com_cl_running->integer ) { return; } Con_Close(); Key_SetCatcher( 0 ); // if we are already connected to the local host, stay connected if ( cls.state >= CA_CONNECTED && !Q_stricmp( cls.servername, "localhost" ) ) { cls.state = CA_CONNECTED; // so the connect screen is drawn memset( cls.updateInfoString, 0, sizeof( cls.updateInfoString ) );// memset( clc.serverMessage, 0, sizeof( clc.serverMessage ) ); memset( &cl.gameState, 0, sizeof( cl.gameState ) ); clc.lastPacketSentTime = -9999; SCR_UpdateScreen(); } else { // clear nextmap so the cinematic shutdown doesn't execute it Cvar_Set( "nextmap", "" ); CL_Disconnect(); Q_strncpyz( cls.servername, "localhost", sizeof(cls.servername) ); cls.state = CA_CHALLENGING; // so the connect screen is drawn Key_SetCatcher( 0 ); SCR_UpdateScreen(); clc.connectTime = -RETRANSMIT_TIMEOUT; NET_StringToAdr( cls.servername, &clc.serverAddress); // we don't need a challenge on the localhost CL_CheckForResend(); } CL_FlushMemory();}
开发者ID:Indie-Jones,项目名称:OpenJK,代码行数:42,
示例10: CL_WebDownloadDoneCb/** CL_WebDownloadDoneCb*/static void CL_WebDownloadDoneCb( int status, const char *contentType, void *privatep ){ bool disconnect = cls.download.disconnect; bool cancelled = cls.download.cancelled; bool success = (cls.download.offset == cls.download.size) && (status > -1); Com_Printf( "Web download %s: %s (%i)/n", success ? "successful" : "failed", cls.download.tempname, status ); if( success ) { CL_DownloadComplete(); } CL_StopServerDownload(); if( cancelled ) { cls.download.requestnext = false; } cls.download.web = false; // check if user pressed escape to stop the downloa if( disconnect ) { CL_Disconnect( NULL ); return; } /*if( success || cancelled )*/ { CL_DownloadDone(); }}
开发者ID:ShaitanShootout,项目名称:BM,代码行数:32,
示例11: GAME_SetModevoid GAME_SetMode (const cgame_export_t *gametype){ const cgame_export_t *list; if (cls.gametype == gametype) return; list = GAME_GetCurrentType(); if (list) { Com_Printf("Shutdown gametype '%s'/n", list->name); list->Shutdown(); /* we dont need to go back to "main" stack if we are already on this stack */ if (!UI_IsWindowOnStack("main")) UI_InitStack("main", "", qtrue, qtrue); } cls.gametype = gametype; CL_Disconnect(); list = GAME_GetCurrentType(); if (list) { Com_Printf("Change gametype to '%s'/n", list->name); /* inventory structure switched/initialized */ INV_DestroyInventory(&cls.i); INV_InitInventory(list->name, &cls.i, &csi, &inventoryImport); /** @todo this should be in GetCGameAPI */ list->Init(NULL); }}
开发者ID:chrisglass,项目名称:ufoai,代码行数:31,
示例12: Host_Error/*================Host_ErrorThis shuts down both the client and server================*/void Host_Error (char *error, ...){ va_list argptr; char string[1024]; static qboolean inerror = false; if (inerror) Sys_Error ("Host_Error: recursively entered"); inerror = true; SCR_EndLoadingPlaque (); // reenable screen updates va_start (argptr,error);#if defined (__APPLE__) || defined (MACOSX) vsnprintf (string,1024,error,argptr);#else vsprintf (string,error,argptr);#endif /* __APPLE__ || MACOSX */ va_end (argptr); Con_Printf ("Host_Error: %s/n",string); if (sv.active) Host_ShutdownServer (false); if (cls.state == ca_dedicated) Sys_Error ("Host_Error: %s/n",string); // dedicated servers exit CL_Disconnect (); cls.demonum = -1; inerror = false; longjmp (host_abortserver, 1);}
开发者ID:MaddTheSane,项目名称:Quake,代码行数:41,
示例13: Host_EndGame/*================Host_EndGame================*/void Host_EndGame (char *message, ...){ va_list argptr; char string[1024]; va_start (argptr,message);#if defined (__APPLE__) || defined (MACOSX) vsnprintf (string,1024,message,argptr);#else vsprintf (string,message,argptr);#endif /* __APPLE__ || MACOSX */ va_end (argptr); Con_DPrintf ("Host_EndGame: %s/n",string); if (sv.active) Host_ShutdownServer (false); if (cls.state == ca_dedicated) Sys_Error ("Host_EndGame: %s/n",string); // dedicated servers exit if (cls.demonum != -1) CL_NextDemo (); else CL_Disconnect (); longjmp (host_abortserver, 1);}
开发者ID:MaddTheSane,项目名称:Quake,代码行数:32,
示例14: SV_Shutdown/*================SV_ShutdownCalled when each game quits,before Sys_Quit or Sys_Error================*/void SV_Shutdown( char *finalmsg ) { if ( !com_sv_running || !com_sv_running->integer ) { return; } Com_Printf( "----- Server Shutdown -----/n" ); if ( svs.clients && !com_errorEntered ) { SV_FinalMessage( finalmsg ); } SV_RemoveOperatorCommands(); SV_MasterShutdown(); SV_ShutdownGameProgs(); // free current level SV_ClearServer(); // free server static data if ( svs.clients ) { //Z_Free( svs.clients ); free( svs.clients ); // RF, avoid trying to allocate large chunk on a fragmented zone } memset( &svs, 0, sizeof( svs ) ); Cvar_Set( "sv_running", "0" ); Com_Printf( "---------------------------/n" ); // disconnect any local clients CL_Disconnect( qfalse );}
开发者ID:Justasic,项目名称:RTCW-MP,代码行数:40,
示例15: Host_Map_f/*======================Host_Map_fhandle amap <servername>command from the console. Active clients are kicked off.======================*/void Host_Map_f (void){ int i; char name[MAX_QPATH], *p; if (Cmd_Argc() < 2) //no map name given { if (cls.state == ca_dedicated) { if (sv.active) Con_Printf ("Current map: %s/n", sv.name); else Con_Printf ("Server not active/n"); } else if (cls.state == ca_connected) { Con_Printf ("Current map: %s ( %s )/n", cl.levelname, cl.mapname); } else { Con_Printf ("map <levelname>: start a new server/n"); } return; } if (cmd_source != src_command) return; cls.demonum = -1; // stop demo loop in case this fails CL_Disconnect (); Host_ShutdownServer(false); if (cls.state != ca_dedicated) IN_Activate(); key_dest = key_game; // remove console or menu SCR_BeginLoadingPlaque (); svs.serverflags = 0; // haven't completed an episode yet q_strlcpy (name, Cmd_Argv(1), sizeof(name)); // remove (any) trailing ".bsp" from mapname -- S.A. p = strstr(name, ".bsp"); if (p && p[4] == '/0') *p = '/0'; SV_SpawnServer (name); if (!sv.active) return; if (cls.state != ca_dedicated) { memset (cls.spawnparms, 0, MAX_MAPSTRING); for (i = 2; i < Cmd_Argc(); i++) { q_strlcat (cls.spawnparms, Cmd_Argv(i), MAX_MAPSTRING); q_strlcat (cls.spawnparms, " ", MAX_MAPSTRING); } Cmd_ExecuteString ("connect local", src_command); }}
开发者ID:ProfessorKaos64,项目名称:vkQuake,代码行数:69,
示例16: Host_Error//This shuts down both the client and servervoid Host_Error (char *error, ...){ va_list argptr; char string[1024]; static qbool inerror = false; if (inerror) Sys_Error ("Host_Error: recursively entered"); inerror = true; va_start (argptr,error); vsnprintf (string, sizeof(string), error, argptr); va_end (argptr); Com_Printf ("/n===========================/n"); Com_Printf ("Host_Error: %s/n",string); Com_Printf ("===========================/n/n"); CL_Disconnect (); if (!host_initialized) Sys_Error ("Host_Error: %s", string); inerror = false; Host_Abort ();}
开发者ID:jite,项目名称:jquake,代码行数:28,
示例17: SV_Shutdown/*================SV_ShutdownCalled when each game quits,before Sys_Quit or Sys_Error================*/void SV_Shutdown( char *finalmsg ) { if ( !com_sv_running || !com_sv_running->integer ) { return; } Com_Printf( "----- Server Shutdown -----/n" ); if ( svs.clients && !com_errorEntered ) { SV_FinalMessage( finalmsg ); } SV_RemoveOperatorCommands(); SV_MasterShutdown(); SV_ShutdownGameProgs(); // free current level SV_ClearServer(); // free server static data if ( svs.clients ) { Z_Free( svs.clients ); } Com_Memset( &svs, 0, sizeof( svs ) ); Cvar_Set( "sv_running", "0" ); Cvar_Set("ui_singlePlayerActive", "0"); Com_Printf( "---------------------------/n" ); // disconnect any local clients CL_Disconnect( qfalse );}
开发者ID:AHPlankton,项目名称:Quake-III-Arena,代码行数:40,
示例18: SV_Shutdown/*================SV_ShutdownCalled when each game quits,before Sys_Quit or Sys_Error================*/void SV_Shutdown( char *finalmsg ) { if ( !com_sv_running || !com_sv_running->integer ) return; Com_Printf( "----- Server Shutdown -----/n" ); if( theSVS.svClients_.size() && !com_errorEntered ) { SV_FinalMessage( finalmsg ); } //SV_RemoveOperatorCommands(); //SV_MasterShutdown(); SV_ShutdownGameProgs(); // free current level SV_ClearServer(); // free server static data// if( theSVS.clients_ ) // Z_Free( theSVS.clients_ );// theSVS.clearClients();// done in theSVS.clear()/// Com_Memset( &svs, 0, sizeof( svs ) ); theSVS.clear(); Cvar_Set( "sv_running", "0" ); Cvar_Set("ui_singlePlayerActive", "0"); Com_Printf( "---------------------------/n" ); // disconnect any local clients CL_Disconnect( false );}
开发者ID:MilitaryForces,项目名称:MilitaryForces,代码行数:42,
示例19: Host_Quitvoid Host_Quit(){ CL_Disconnect (); Host_ShutdownServer(false); Sys_Quit ();}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:7,
示例20: CL_Disconnect_fvoidCL_Disconnect_f(void){ CL_Disconnect(); if (sv.active) Host_ShutdownServer(false);}
开发者ID:dommul,项目名称:blinky,代码行数:7,
示例21: Host_Error/*================Host_ErrorThis shuts down both the client and server================*/void Host_Error (const char *error, ...){ static char hosterrorstring1[MAX_INPUTLINE]; // THREAD UNSAFE static char hosterrorstring2[MAX_INPUTLINE]; // THREAD UNSAFE static qboolean hosterror = false; va_list argptr; // turn off rcon redirect if it was active when the crash occurred // to prevent loops when it is a networking problem Con_Rcon_Redirect_Abort(); va_start (argptr,error); dpvsnprintf (hosterrorstring1,sizeof(hosterrorstring1),error,argptr); va_end (argptr); Con_Printf("Host_Error: %s/n", hosterrorstring1); // LordHavoc: if crashing very early, or currently shutting down, do // Sys_Error instead if (host_framecount < 3 || host_shuttingdown) Sys_Error ("Host_Error: %s", hosterrorstring1); if (hosterror) Sys_Error ("Host_Error: recursively entered (original error was: %s new error is: %s)", hosterrorstring2, hosterrorstring1); hosterror = true; strlcpy(hosterrorstring2, hosterrorstring1, sizeof(hosterrorstring2)); CL_Parse_DumpPacket(); CL_Parse_ErrorCleanUp(); //PR_Crash(); // print out where the crash happened, if it was caused by QC (and do a cleanup) PRVM_Crash(SVVM_prog); PRVM_Crash(CLVM_prog);#ifdef CONFIG_MENU PRVM_Crash(MVM_prog);#endif cl.csqc_loaded = false; Cvar_SetValueQuick(&csqc_progcrc, -1); Cvar_SetValueQuick(&csqc_progsize, -1); SV_LockThreadMutex(); Host_ShutdownServer (); SV_UnlockThreadMutex(); if (cls.state == ca_dedicated) Sys_Error ("Host_Error: %s",hosterrorstring2); // dedicated servers exit CL_Disconnect (); cls.demonum = -1; hosterror = false; Host_AbortCurrentFrame();}
开发者ID:divVerent,项目名称:darkplaces-travis,代码行数:66,
示例22: CL_Quit_fstatic voidCL_Quit_f (void){ if (!con_module) Sys_Printf ("I hope you wanted to quit/n"); CL_Disconnect (); Sys_Quit ();}
开发者ID:EIREXE,项目名称:Quakeforge-gcw0,代码行数:8,
示例23: CL_Drop/** * @brief Ensures the right menu cvars are set after error drop or map change * @note E.g. called after an ERR_DROP was thrown * @sa CL_Disconnect * @sa SV_Map */void CL_Drop (void){ CL_Disconnect(); /* drop loading plaque */ SCR_EndLoadingPlaque(); GAME_Drop();}
开发者ID:Astrocoderguy,项目名称:ufoai,代码行数:15,
示例24: SV_Shutdown/*================SV_ShutdownCalled when each game quits,before Sys_Quit or Sys_Error================*/void SV_Shutdown( char *finalmsg ) { if ( !com_sv_running || !com_sv_running->integer ) { return; } Com_Printf( "----- Server Shutdown (%s) -----/n", finalmsg ); NET_LeaveMulticast6(); if ( svs.clients && !com_errorEntered ) { SV_FinalMessage( finalmsg ); } SV_RemoveOperatorCommands(); SV_MasterShutdown(); SV_ShutdownGameProgs();#ifdef DEDICATED Com_ShutdownRef();#endif MSG_ShutdownNetFields(); // free current level SV_ClearServer(); // free server static data if(svs.players) { int index; for(index = 0; index < sv_maxclients->integer; index++) SV_FreePlayer(&svs.players[index]); Z_Free(svs.players); } if(svs.clients) { int index; for(index = 0; index < sv_maxclients->integer; index++) SV_FreeClient(&svs.clients[index]); Z_Free(svs.clients); } Com_Memset( &svs, 0, sizeof( svs ) ); Cvar_Set( "sv_running", "0" ); Cvar_Set("ui_singlePlayerActive", "0"); Cvar_Set("sv_public", "0"); Com_Printf( "---------------------------/n" ); // disconnect any local clients if( sv_killserver->integer != 2 ) CL_Disconnect( qfalse );}
开发者ID:mecwerks,项目名称:spearmint-ios,代码行数:65,
示例25: CL_Drop/*================CL_DropCalled after an Host_Error was thrown================*/void CL_Drop( void ){ if( cls.state == ca_uninitialized ) return; CL_Disconnect(); // This fixes crash in menu_playersetup after disconnecting from server CL_ClearEdicts();}
开发者ID:Reedych,项目名称:xash3d,代码行数:16,
示例26: CLQW_Model_NextDownloadstatic void CLQW_Model_NextDownload() { if ( clc.downloadNumber == 0 ) { common->Printf( "Checking models.../n" ); clc.downloadNumber = 1; } clc.downloadType = dl_model; for ( ; cl.qh_model_name[ clc.downloadNumber ][ 0 ] ; clc.downloadNumber++ ) { const char* s = cl.qh_model_name[ clc.downloadNumber ]; if ( s[ 0 ] == '*' ) { continue; // inline brush model } if ( !CL_CheckOrDownloadFile( s ) ) { return; // started a download } } CM_LoadMap( cl.qh_model_name[ 1 ], true, NULL ); cl.model_clip[ 1 ] = 0; R_LoadWorld( cl.qh_model_name[ 1 ] ); for ( int i = 2; i < MAX_MODELS_Q1; i++ ) { if ( !cl.qh_model_name[ i ][ 0 ] ) { break; } cl.model_draw[ i ] = CLQ1_RegisterModel( cl.qh_model_name[ i ] ); if ( cl.qh_model_name[ i ][ 0 ] == '*' ) { cl.model_clip[ i ] = CM_InlineModel( String::Atoi( cl.qh_model_name[ i ] + 1 ) ); } if ( !cl.model_draw[ i ] ) { common->Printf( "/nThe required model file '%s' could not be found or downloaded./n/n", cl.qh_model_name[ i ] ); common->Printf( "You may need to download or purchase a %s client " "pack in order to play on this server./n/n", fs_gamedir ); CL_Disconnect( true ); return; } } CLQW_CalcModelChecksum( "progs/player.mdl", "pmodel" ); CLQW_CalcModelChecksum( "progs/eyes.mdl", "emodel" ); // all done R_EndRegistration(); int CheckSum1; int CheckSum2; CM_MapChecksums( CheckSum1, CheckSum2 ); // done with modellist, request first of static signon messages CL_AddReliableCommand( va( "prespawn %i 0 %i", cl.servercount, CheckSum2 ) );}
开发者ID:janisl,项目名称:jlquake,代码行数:56,
示例27: SV_Shutdown/*================SV_ShutdownCalled when each game quits,before Sys_Quit or Sys_Error================*/void SV_Shutdown( char *finalmsg ){ if ( !com_sv_running || !com_sv_running->integer ) { return; } Com_Printf( "----- Server Shutdown -----/n" ); if ( svs.clients && !com_errorEntered ) { SV_FinalMessage( finalmsg ); } SV_RemoveOperatorCommands(); SV_MasterShutdown(); SV_ShutdownGameProgs();/*Ghoul2 Insert Start*/ // de allocate the snapshot entities if (svs.snapshotEntities) { delete[] svs.snapshotEntities; svs.snapshotEntities = NULL; }#ifdef G2_COLLISION_ENABLED if ( com_dedicated->integer && G2VertSpaceServer) { delete G2VertSpaceServer; G2VertSpaceServer = 0; }#endif // free current level SV_ClearServer(); // free server static data if ( svs.clients ) { Z_Free( svs.clients ); } Com_Memset( &svs, 0, sizeof( svs ) ); Cvar_Set( "sv_running", "0" ); Cvar_Set("ui_singlePlayerActive", "0"); Com_Printf( "---------------------------/n" ); // disconnect any local clients CL_Disconnect( qfalse ); // shutdown webserver if (mgsrv) { SV_MV_Websrv_Shutdown(); }}
开发者ID:entdark,项目名称:jk2mv,代码行数:64,
示例28: CL_Quit_f/*==================CL_Quit_f==================*/void CL_Quit_f (void){ if (1 /* key_dest != key_console */ /* && cls.state != ca_dedicated */) { //M_Menu_Quit_f (); return; } CL_Disconnect (); Sys_Quit ();}
开发者ID:jrk,项目名称:QuakeTM,代码行数:15,
示例29: Host_Stopdemo_f/*==================Host_Stopdemo_fReturn to looping demos==================*/static voidHost_Stopdemo_f(void){ if (cls.state == ca_dedicated) return; if (!cls.demoplayback) return; CL_StopPlayback(); CL_Disconnect();}
开发者ID:RetroPie,项目名称:tyrquake,代码行数:17,
示例30: Host_Quit_fvoidHost_Quit_f (void){ if (!con_module) Sys_Printf ("I hope you wanted to quit/n"); CL_Disconnect (); Host_ShutdownServer (false); Sys_Quit ();}
开发者ID:EIREXE,项目名称:Quakeforge-gcw0,代码行数:10,
注:本文中的CL_Disconnect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CL_Exception函数代码示例 C++ CL_DEBUG_PRINT函数代码示例 |