Added #define to disable the online login for now. Makes it easier
to start and debug LAN play.
This commit is contained in:
parent
afac848bb9
commit
40bdb4d777
@ -513,16 +513,22 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
"\"Connect to the Internet\"."));
|
||||
return;
|
||||
}
|
||||
|
||||
// Define this to require a login to the stk server (default behaviour)
|
||||
// Undefine for testing LAN only.
|
||||
#undef REQUIRE_LOGIN
|
||||
#ifdef REQUIRE_LOGIN
|
||||
if (PlayerManager::getCurrentOnlineId())
|
||||
#endif
|
||||
{
|
||||
ProfileManager::get()->setVisiting(PlayerManager::getCurrentOnlineId());
|
||||
OnlineProfileServers::getInstance()->push();
|
||||
}
|
||||
#ifdef REQUIRE_LOGIN
|
||||
else
|
||||
{
|
||||
UserScreen::getInstance()->push();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (selection == "addons")
|
||||
{
|
||||
|
@ -57,6 +57,12 @@ OnlineProfileServers::OnlineProfileServers() : OnlineProfileBase("online/profile
|
||||
void OnlineProfileServers::loadedFromFile()
|
||||
{
|
||||
OnlineProfileBase::loadedFromFile();
|
||||
if (!PlayerManager::getCurrentOnlineId())
|
||||
{
|
||||
getWidget<IconButtonWidget>("find_wan_server")->setActive(false);
|
||||
getWidget<IconButtonWidget>("create_wan_server")->setActive(false);
|
||||
getWidget<IconButtonWidget>("quick_wan_play")->setActive(false);
|
||||
}
|
||||
} // loadedFromFile
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user