From d2c62ae6e55d5d71e8262a21ca1391024c15af83 Mon Sep 17 00:00:00 2001 From: ka3dr Date: Fri, 4 Sep 2026 21:11:39 +0300 Subject: [PATCH] Block SnapTap on Legit Network servers Legit Network doesn't have an official DDNet community id, so detect it by server name instead, matching the same approach already used for the Ego/eternal-gores provider elsewhere in the client. --- src/game/client/gameclient.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 2d382f9bd..7d83607a5 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -6752,6 +6752,16 @@ bool CGameClient::IsSnapTapBlockedByCommunity() const if(IsBlockedGameType(m_GameInfo.m_aGameType)) return true; + auto IsLegitNetworkName = [](const char *pName) -> bool { + return pName != nullptr && pName[0] != '\0' && str_find_nocase(pName, "Legit Network") != nullptr; + }; + if(IsLegitNetworkName(ServerInfo.m_aName)) + return true; + if(m_ConnectServerInfo.has_value() && IsLegitNetworkName(m_ConnectServerInfo->m_aName)) + return true; + if(pEntry && IsLegitNetworkName(pEntry->m_Info.m_aName)) + return true; + return false; }