Cleanly remove player when an exit is requested

The client will actually do this itself when clicking the quit button in the tilde menu, but for the idle timer the connection would remain open until the game is closed.
This commit is contained in:
CakeLancelot 2022-07-19 01:17:43 -05:00
parent 63d4087488
commit 1bd4d2fbee

View File

@ -369,6 +369,9 @@ static void exitGame(CNSocket* sock, CNPacketData* data) {
response.iExitCode = 1;
sock->sendPacket(response, P_FE2CL_REP_PC_EXIT_SUCC);
sock->kill();
CNShardServer::_killConnection(sock);
}
static void revivePlayer(CNSocket* sock, CNPacketData* data) {