Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
server: make force_enet_disconnect take a netID, not a peerID
  • Loading branch information
blattersturm committed Jul 2, 2019
1 parent fd04e57 commit 552d082
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -8,6 +8,9 @@
#include <NetAddress.h>
#include <NetBuffer.h>

#include <ClientRegistry.h>
#include <ServerInstanceBase.h>

#include <enet/enet.h>

namespace fx
Expand Down Expand Up @@ -150,6 +153,8 @@ namespace fx
{
static ConsoleCommand cmd("force_enet_disconnect", [this](int peerIdx)
{
peerIdx = m_server->GetInstance()->GetComponent<fx::ClientRegistry>()->GetClientByNetID(peerIdx)->GetPeer();

auto peer = m_peerHandles.left.find(peerIdx);

if (peer != m_peerHandles.left.end())
Expand Down

0 comments on commit 552d082

Please sign in to comment.