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)
| 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 |
no test coverage detected