diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp index a0458168..be12eb79 100644 --- a/launcher/LaunchController.cpp +++ b/launcher/LaunchController.cpp @@ -117,31 +117,34 @@ void LaunchController::login() { switch(m_accountToUse->accountState()) { case AccountState::Offline: { - // we ask the user for a player name - bool ok = false; - QString usedname = m_session->player_name; - QString name = QInputDialog::getText( - m_parentWidget, - tr("Player name"), - tr("Choose your offline mode player name."), - QLineEdit::Normal, - m_session->player_name, - &ok - ); - if (!ok) - { - tryagain = false; - break; - } - if (name.length()) - { - usedname = name; - } - m_session->MakeOffline(usedname); - // offline flavored game from here :3 + m_session->wants_online = false; // NOTE: fallthrough is intentional } case AccountState::Online: { + if(!m_session->wants_online) { + // we ask the user for a player name + bool ok = false; + QString usedname = m_session->player_name; + QString name = QInputDialog::getText( + m_parentWidget, + tr("Player name"), + tr("Choose your offline mode player name."), + QLineEdit::Normal, + m_session->player_name, + &ok + ); + if (!ok) + { + tryagain = false; + break; + } + if (name.length()) + { + usedname = name; + } + m_session->MakeOffline(usedname); + // offline flavored game from here :3 + } if(m_accountToUse->ownsMinecraft() && !m_accountToUse->hasProfile()) { auto entitlement = m_accountToUse->accountData()->minecraftEntitlement; QString errorString;