diff options
author | Bottinator22 <bottinator22@gmail.com> | 2025-04-25 00:27:10 -0700 |
---|---|---|
committer | Bottinator22 <bottinator22@gmail.com> | 2025-04-25 00:27:10 -0700 |
commit | 621864b9b00ba7a9ae0fceb0a7db3ace6d4906b9 (patch) | |
tree | 6e85c4e1980fb648772446c8f8db994e5a71fdc2 /source/client | |
parent | 6369ba9ec72f097d8cc9ab06bed0c6816da516c8 (diff) |
allow forcing legacy connections
Diffstat (limited to 'source/client')
-rw-r--r-- | source/client/StarClientApplication.cpp | 11 | ||||
-rw-r--r-- | source/client/StarClientApplication.hpp | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp index a86a574..f79226e 100644 --- a/source/client/StarClientApplication.cpp +++ b/source/client/StarClientApplication.cpp @@ -73,7 +73,8 @@ Json const AdditionalDefaultConfiguration = Json::parseJson(R"JSON( "title" : { "multiPlayerAddress" : "", "multiPlayerPort" : "", - "multiPlayerAccount" : "" + "multiPlayerAccount" : "", + "multiPlayerForceLegacy" : false }, "bindings" : { @@ -638,6 +639,7 @@ void ClientApplication::changeState(MainAppState newState) { m_titleScreen->setMultiPlayerAddress(toString(address->address())); m_titleScreen->setMultiPlayerPort(toString(address->port())); m_titleScreen->setMultiPlayerAccount(configuration->getPath("title.multiPlayerAccount").toString()); + m_titleScreen->setMultiPlayerForceLegacy(configuration->getPath("title.multiPlayerForceLegacy").optBool().value(false)); m_titleScreen->goToMultiPlayerSelectCharacter(false); } else { m_titleScreen->goToMultiPlayerSelectCharacter(true); @@ -646,6 +648,7 @@ void ClientApplication::changeState(MainAppState newState) { m_titleScreen->setMultiPlayerAddress(configuration->getPath("title.multiPlayerAddress").toString()); m_titleScreen->setMultiPlayerPort(configuration->getPath("title.multiPlayerPort").toString()); m_titleScreen->setMultiPlayerAccount(configuration->getPath("title.multiPlayerAccount").toString()); + m_titleScreen->setMultiPlayerForceLegacy(configuration->getPath("title.multiPlayerForceLegacy").optBool().value(false)); } } @@ -710,7 +713,7 @@ void ClientApplication::changeState(MainAppState newState) { bool allowAssetsMismatch = m_root->configuration()->get("allowAssetsMismatch").toBool(); if (auto errorMessage = m_universeClient->connect(UniverseConnection(std::move(packetSocket)), allowAssetsMismatch, - multiPlayerConnection.account, multiPlayerConnection.password)) { + multiPlayerConnection.account, multiPlayerConnection.password, multiPlayerConnection.forceLegacy)) { setError(*errorMessage); return; } @@ -882,13 +885,15 @@ void ClientApplication::updateTitle(float dt) { m_pendingMultiPlayerConnection = PendingMultiPlayerConnection{ address.right(), m_titleScreen->multiPlayerAccount(), - m_titleScreen->multiPlayerPassword() + m_titleScreen->multiPlayerPassword(), + m_titleScreen->multiPlayerForceLegacy() }; auto configuration = m_root->configuration(); configuration->setPath("title.multiPlayerAddress", m_titleScreen->multiPlayerAddress()); configuration->setPath("title.multiPlayerPort", m_titleScreen->multiPlayerPort()); configuration->setPath("title.multiPlayerAccount", m_titleScreen->multiPlayerAccount()); + configuration->setPath("title.multiPlayerForceLegacy", m_titleScreen->multiPlayerForceLegacy()); changeState(MainAppState::MultiPlayer); } diff --git a/source/client/StarClientApplication.hpp b/source/client/StarClientApplication.hpp index 2fcddb7..8824ea0 100644 --- a/source/client/StarClientApplication.hpp +++ b/source/client/StarClientApplication.hpp @@ -57,6 +57,7 @@ private: Variant<P2PNetworkingPeerId, HostAddressWithPort> server; String account; String password; + bool forceLegacy; }; struct PostProcessGroup { |