NOISSUE fix launching offline while online

This commit is contained in:
Petr Mrázek 2021-12-06 20:17:31 +01:00
parent 825ef52dd5
commit a5581b479e

View File

@ -117,6 +117,11 @@ void LaunchController::login() {
switch(m_accountToUse->accountState()) {
case AccountState::Offline: {
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;
@ -139,9 +144,7 @@ void LaunchController::login() {
}
m_session->MakeOffline(usedname);
// offline flavored game from here :3
// NOTE: fallthrough is intentional
}
case AccountState::Online: {
if(m_accountToUse->ownsMinecraft() && !m_accountToUse->hasProfile()) {
auto entitlement = m_accountToUse->accountData()->minecraftEntitlement;
QString errorString;