From a355fb9b2ae73a533a259e3d912f4914fe5db1d9 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 2 Apr 2016 19:08:13 +0200 Subject: [PATCH] Changed: If only login is passed as parameter, neither use auto login nor alt login --- code/ryzom/client/src/client.cpp | 12 ++++++++---- code/ryzom/client/src/far_tp.cpp | 12 ++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 9c504302c..255e8e95b 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -190,13 +190,17 @@ int main(int argc, char **argv) // no shard id in ring mode std::string sLoginShardId; - if (Args.haveAdditionalArg("login") && Args.haveAdditionalArg("password")) + if (Args.haveAdditionalArg("login")) { LoginLogin = Args.getAdditionalArg("login").front(); - LoginPassword = Args.getAdditionalArg("password").front(); - if (Args.haveAdditionalArg("shard_id")) - sLoginShardId = Args.getAdditionalArg("shard_id").front(); + if (Args.haveAdditionalArg("password")) + { + LoginPassword = Args.getAdditionalArg("password").front(); + + if (Args.haveAdditionalArg("shard_id")) + sLoginShardId = Args.getAdditionalArg("shard_id").front(); + } } if (sLoginShardId.empty() || !fromString(sLoginShardId, LoginShardId)) diff --git a/code/ryzom/client/src/far_tp.cpp b/code/ryzom/client/src/far_tp.cpp index 765b1c421..1c43a0d79 100644 --- a/code/ryzom/client/src/far_tp.cpp +++ b/code/ryzom/client/src/far_tp.cpp @@ -246,22 +246,22 @@ void CLoginStateMachine::run() if (!ClientCfg.TestBrowser) { - if (LoginLogin.empty()) + if (LoginPassword.empty()) { - if (LoginCustomParameters.empty()) + if (!LoginCustomParameters.empty() && LoginLogin.empty()) { - // standard procedure + // alternate login procedure SM_BEGIN_EVENT_TABLE - SM_EVENT(ev_init_done, st_login); + SM_EVENT(ev_init_done, st_alt_login); SM_EVENT(ev_skip_all_login, st_ingame); SM_EVENT(ev_quit, st_end); SM_END_EVENT_TABLE } else { - // alternate login procedure + // standard procedure SM_BEGIN_EVENT_TABLE - SM_EVENT(ev_init_done, st_alt_login); + SM_EVENT(ev_init_done, st_login); SM_EVENT(ev_skip_all_login, st_ingame); SM_EVENT(ev_quit, st_end); SM_END_EVENT_TABLE