MCPcopy Create free account
hub / github.com/demoth/jake2 / SV_DropClient

Method SV_DropClient

server/src/main/java/jake2/server/SV_MAIN.java:560–576  ·  view source on GitHub ↗

Called when the player is totally leaving the server, either willingly or unwillingly. This is NOT called if the entire server is quiting or crashing.

(client_t client)

Source from the content-addressed store, hash-verified

558 * crashing.
559 */
560 static void SV_DropClient(client_t client) {
561 // add the disconnect
562 client.netchan.reliablePending.add(new DisconnectMessage());
563
564 if (client.state == ClientStates.CS_SPAWNED) {
565 // call the prog function for removing a client
566 // this will remove the body, among other things
567 games.get(client.gameName).gameExports.ClientDisconnect(client.edict);
568 }
569
570 if (client.download != null) {
571 client.download = null;
572 }
573
574 client.state = ClientStates.CS_ZOMBIE; // become free in a few seconds
575 client.name = "";
576 }
577
578 /**
579 * Sends text to all active clients

Callers 6

SV_Disconnect_fMethod · 0.95
SV_Kick_fMethod · 0.95
SV_SendClientMessagesMethod · 0.95
SV_ReadPacketsMethod · 0.95
SV_CheckTimeoutsMethod · 0.95

Calls 3

ClientDisconnectMethod · 0.65
addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected