allow enabeling Network Multiplayer through CMake flags
This commit is contained in:
parent
43d5dbeb3e
commit
c79c51e6c7
@ -19,6 +19,7 @@ option(USE_WIIUSE "Support for wiimote input devices" ON)
|
|||||||
option(USE_FRIBIDI "Support for right-to-left languages" ON)
|
option(USE_FRIBIDI "Support for right-to-left languages" ON)
|
||||||
option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON)
|
option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON)
|
||||||
option(USE_SYSTEM_ANGELSCRIPT "Use system angelscript instead of built-in angelscript. If you enable this option, make sure to use a compatible version." OFF)
|
option(USE_SYSTEM_ANGELSCRIPT "Use system angelscript instead of built-in angelscript. If you enable this option, make sure to use a compatible version." OFF)
|
||||||
|
option(ENABLE_NETWORK_MULTIPLAYER "Option description" OFF)
|
||||||
|
|
||||||
if(MSVC AND (MSVC_VERSION LESS 1900))
|
if(MSVC AND (MSVC_VERSION LESS 1900))
|
||||||
# Normally hide the option to build wiiuse on VS, since it depends
|
# Normally hide the option to build wiiuse on VS, since it depends
|
||||||
@ -195,6 +196,11 @@ if(UNIX AND NOT APPLE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Netwowk Multiplayer
|
||||||
|
if(ENABLE_NETWORK_MULTIPLAYER)
|
||||||
|
add_definitions(-DENABLE_NETWORK_MULTIPLAYER_SCREEN)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Set some compiler options
|
# Set some compiler options
|
||||||
if(UNIX OR MINGW)
|
if(UNIX OR MINGW)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
|
||||||
|
@ -175,7 +175,7 @@ void MainMenuScreen::onUpdate(float delta)
|
|||||||
m_online->setLabel( _("Login" ));
|
m_online->setLabel( _("Login" ));
|
||||||
m_user_id->setText(player->getName());
|
m_user_id->setText(player->getName());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// now must be either logging in or logging out
|
// now must be either logging in or logging out
|
||||||
m_online->setActive(false);
|
m_online->setActive(false);
|
||||||
@ -297,7 +297,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
|||||||
StoryModeStatus* sms = PlayerManager::getCurrentPlayer()->getStoryModeStatus();
|
StoryModeStatus* sms = PlayerManager::getCurrentPlayer()->getStoryModeStatus();
|
||||||
sms->unlockFeature(const_cast<ChallengeStatus*>(sms->getChallengeStatus("gp1")),
|
sms->unlockFeature(const_cast<ChallengeStatus*>(sms->getChallengeStatus("gp1")),
|
||||||
RaceManager::DIFFICULTY_HARD);
|
RaceManager::DIFFICULTY_HARD);
|
||||||
|
|
||||||
StateManager::get()->enterGameState();
|
StateManager::get()->enterGameState();
|
||||||
race_manager->setMinorMode(RaceManager::MINOR_MODE_CUTSCENE);
|
race_manager->setMinorMode(RaceManager::MINOR_MODE_CUTSCENE);
|
||||||
race_manager->setNumKarts(0);
|
race_manager->setNumKarts(0);
|
||||||
@ -307,7 +307,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
|||||||
|
|
||||||
FeatureUnlockedCutScene* scene =
|
FeatureUnlockedCutScene* scene =
|
||||||
FeatureUnlockedCutScene::getInstance();
|
FeatureUnlockedCutScene::getInstance();
|
||||||
|
|
||||||
std::vector<std::string> parts;
|
std::vector<std::string> parts;
|
||||||
parts.push_back("featunlocked");
|
parts.push_back("featunlocked");
|
||||||
((CutsceneWorld*)World::getWorld())->setParts(parts);
|
((CutsceneWorld*)World::getWorld())->setParts(parts);
|
||||||
@ -494,9 +494,12 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
|||||||
if (PlayerManager::getCurrentOnlineId())
|
if (PlayerManager::getCurrentOnlineId())
|
||||||
{
|
{
|
||||||
// For 0.8.2 disable the server menu, instead go to online profile
|
// For 0.8.2 disable the server menu, instead go to online profile
|
||||||
//OnlineScreen::getInstance()->push();
|
#ifdef ENABLE_NETWORK_MULTIPLAYER_SCREEN
|
||||||
|
OnlineScreen::getInstance()->push();
|
||||||
|
#else
|
||||||
ProfileManager::get()->setVisiting(PlayerManager::getCurrentOnlineId());
|
ProfileManager::get()->setVisiting(PlayerManager::getCurrentOnlineId());
|
||||||
TabOnlineProfileAchievements::getInstance()->push();
|
TabOnlineProfileAchievements::getInstance()->push();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user