From fecbff0501e49cd6adf17294d2af22cf6ecc09bd Mon Sep 17 00:00:00 2001 From: Jaredl-Dev <260281143+Jaredl-Dev@users.noreply.github.com> Date: Fri, 14 Aug 2026 17:33:20 -0700 Subject: [PATCH] - Add command line override to disable the community data patch --- .../GameEngine/Source/Common/System/ArchiveFileSystem.cpp | 3 ++- GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h | 7 +++++++ GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Core/GameEngine/Source/Common/System/ArchiveFileSystem.cpp b/Core/GameEngine/Source/Common/System/ArchiveFileSystem.cpp index 5d88922554c..5720c5b9417 100644 --- a/Core/GameEngine/Source/Common/System/ArchiveFileSystem.cpp +++ b/Core/GameEngine/Source/Common/System/ArchiveFileSystem.cpp @@ -235,7 +235,8 @@ void ArchiveFileSystem::loadMods() { #if defined(GENERALS_ONLINE) && defined(GENERALS_ONLINE_COMMUNITY_PATCH_CHANGES) // load community data patch BIG - if (NGMP_OnlineServicesManager::Settings.DataPacks_UseCommunityPatch()) + if (NGMP_OnlineServicesManager::Settings.DataPacks_UseCommunityPatch() + && !TheGlobalData->m_commandLineData.isCommunityDataPatchDisabled()) { std::string strBigPath = std::format("{}GeneralsOnlineGameData/500_900_CommunityPatch_CoreINI.big", TheGlobalData->getPath_UserData().str()); bool bLoaded = false; diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h index 5daf7773607..5b87552ada6 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h @@ -59,13 +59,20 @@ class CommandLineData friend class CommandLine; friend class GlobalData; +public: + Bool isCommunityDataPatchDisabled() const { return m_disableCommunityDataPatch; } + void disableCommunityDataPatch() { m_disableCommunityDataPatch = true; } + +private: CommandLineData() : m_hasParsedCommandLineForStartup(false) , m_hasParsedCommandLineForEngineInit(false) + , m_disableCommunityDataPatch(false) {} Bool m_hasParsedCommandLineForStartup; Bool m_hasParsedCommandLineForEngineInit; + Bool m_disableCommunityDataPatch; }; //------------------------------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp b/GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp index 35bacbb7161..5ddbe873ab9 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp @@ -1126,6 +1126,13 @@ Int parseMod(char *args[], Int num) return 1; } +Int parseDisableCommunityDataPatch(char *args[], Int num) +{ + TheWritableGlobalData->m_commandLineData.disableCommunityDataPatch(); + + return 1; +} + #ifdef DEBUG_LOGGING Int parseSetDebugLevel(char *args[], int num) { @@ -1207,6 +1214,7 @@ static CommandLineParam paramsForEngineInit[] = { "-scriptDebug", parseScriptDebug }, { "-playStats", parsePlayStats }, { "-mod", parseMod }, + { "-disableCommunityDataPatch", parseDisableCommunityDataPatch }, { "-noshaders", parseNoShaders }, { "-quickstart", parseQuickStart }, { "-useWaveEditor", parseUseWaveEditor },