From bf2f8e39a5a979e0144b5dd9dc4db2362161e825 Mon Sep 17 00:00:00 2001 From: Nuno Date: Fri, 2 Apr 2021 19:04:36 +0200 Subject: [PATCH] Added nopatch arg for use with Ryztart --- code/ryzom/client/src/client.cpp | 1 + code/ryzom/client/src/far_tp.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index e824f6529..4e933b6da 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -180,6 +180,7 @@ int main(int argc, char **argv) Args.setVersion(getDisplayVersion()); Args.setDescription("Ryzom client"); + Args.addArg("n", "nopatch", "value", "Use this to not use patch system"); Args.addArg("p", "profile", "id", "Use this profile to determine what directory to use by default"); Args.addAdditionalArg("login", "Login to use", true, false); Args.addAdditionalArg("password", "Password to use", true, false); diff --git a/code/ryzom/client/src/far_tp.cpp b/code/ryzom/client/src/far_tp.cpp index 0a594e540..1c2a6e612 100644 --- a/code/ryzom/client/src/far_tp.cpp +++ b/code/ryzom/client/src/far_tp.cpp @@ -49,12 +49,12 @@ #include "login_progress_post_thread.h" #include "interface_v3/action_handler_base.h" #include "item_group_manager.h" +#include "nel/misc/cmd_args.h" #ifdef DEBUG_NEW #define new DEBUG_NEW #endif - using namespace NLMISC; using namespace NLNET; using namespace NL3D; @@ -210,6 +210,7 @@ extern bool IsInRingSession; extern void selectTipsOfTheDay (uint tips); #define BAR_STEP_TP 2 +extern NLMISC::CCmdArgs Args; CLoginStateMachine::TEvent CLoginStateMachine::waitEvent() { @@ -462,12 +463,14 @@ void CLoginStateMachine::run() case st_check_patch: /// check the data to check if patch needed CLoginProgressPostThread::getInstance().step(CLoginStep(LoginStep_PostLogin, "login_step_post_login")); - if (!ClientCfg.PatchWanted) + + if (!ClientCfg.PatchWanted || (Args.haveArg("n") && Args.getLongArg("nopatch").front() == "1")) { // client don't want to be patched ! _CurrentState = st_display_eula; break; } + initPatchCheck(); SM_BEGIN_EVENT_TABLE if (isBGDownloadEnabled()) @@ -1517,4 +1520,3 @@ void CFarTP::farTPmainLoop() if(welcomeWindow) initWelcomeWindow(); } -