Skip to content

Commit

Permalink
Fix check that denies new clients from a singleplayer session
Browse files Browse the repository at this point in the history
  • Loading branch information
savilli committed Dec 28, 2021
1 parent cc64a04 commit 0fa5453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/network/serverpackethandler.cpp
Expand Up @@ -86,7 +86,7 @@ void Server::handleCommand_Init(NetworkPacket* pkt)

// Do not allow multiple players in simple singleplayer mode.
// This isn't a perfect way to do it, but will suffice for now
if (m_simple_singleplayer_mode && m_clients.getClientIDs().size() > 1) {
if (m_simple_singleplayer_mode && !m_clients.getClientIDs().empty()) {
infostream << "Server: Not allowing another client (" << addr_s <<
") to connect in simple singleplayer mode" << std::endl;
DenyAccess(peer_id, SERVER_ACCESSDENIED_SINGLEPLAYER);
Expand Down

0 comments on commit 0fa5453

Please sign in to comment.