void CPlayer::Kick(const char *str) { MarkAsBeingKicked(); INetChannel *pNetChan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(m_iIndex)); IClient *pClient = static_cast<IClient *>(pNetChan->GetMsgHandler()); pClient->Disconnect("%s", str); }
void TServerConnectState::Finalize() { IClient* client = (IClient*)Application->RetrieveInterface(IID_IClient); assert(client); client->Disconnect(); IServer* server = (IServer*)Application->RetrieveInterface(IID_IServer); assert(server); server->Stop(); TGameState::Finalize(); }