Skip to content

Commit 020b706

Browse files
committed
Don't reconnect clients if there's only 1 addon
Including the current map itself, so this is only for servers running default maps.
1 parent 9e3c17b commit 020b706

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/multiaddonmanager.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,11 @@ bool MultiAddonManager::Hook_ClientConnect( CPlayerSlot slot, const char *pszNam
726726
if (m_ExtraAddons.Count() == 0 || !CommandLine()->HasParm("-dedicated"))
727727
RETURN_META_VALUE(MRES_IGNORED, true);
728728

729+
// If we're on a default map and we have only 1 addon, no need to do any of this
730+
// The client will be prompted to download upon receiving C2S_CONNECTION with an addon
731+
if (m_ExtraAddons.Count() == 1 && m_sCurrentWorkshopMap.empty())
732+
RETURN_META_VALUE(MRES_IGNORED, true);
733+
729734
Message("Client %s (%lli) connected:\n", pszName, xuid);
730735

731736
// Store the client's ID temporarily as they will get reconnected once an extra addon is sent

0 commit comments

Comments
 (0)