コード例 #1
0
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);
}
コード例 #2
0
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();
}