Add an option to kick players from netplay.

This commit is contained in:
Rachel Bryk
2014-05-29 18:59:07 -04:00
parent 3b23f4bbd6
commit dbcd40111f
4 changed files with 44 additions and 0 deletions

View File

@ -583,6 +583,18 @@ void NetPlayServer::SendToClients(sf::Packet& packet, const PlayerId skip_pid)
}
}
void NetPlayServer::KickPlayer(u8 player)
{
for (auto& current_player : m_players)
{
if (current_player.second.pid == player)
{
current_player.second.socket.Close();
return;
}
}
}
#ifdef USE_UPNP
#include <miniwget.h>
#include <miniupnpc.h>