Add an option to kick players from netplay.

This commit is contained in:
Rachel Bryk committed 2014-06-18 13:22:45 -04:00
1 parent 3b23f4bbd6
commit dbcd40111f
4 files changed
+44

No files matched your search

+12
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>