Fixed loading userlevels
parent
9fda292e01
commit
a30202d884
|
@ -610,19 +610,25 @@ bool CApplication::Create()
|
|||
// Create the robot application.
|
||||
m_controller = new CController(this, !defaultValues);
|
||||
|
||||
if(m_runSceneName == "custom")
|
||||
{
|
||||
m_controller->GetRobotMain()->ChangePhase(PHASE_USER); // To load userlevel list - TODO: this is ugly
|
||||
}
|
||||
|
||||
if(m_dedicatedServer)
|
||||
{
|
||||
m_controller->GetRobotMain()->SetExitAfterMission(true);
|
||||
m_controller->StartMPServer(m_runSceneName, m_runSceneRank/100, m_runSceneRank%100);
|
||||
} else {
|
||||
if(!m_serverAddress.empty())
|
||||
{
|
||||
m_controller->GetRobotMain()->SetExitAfterMission(true);
|
||||
m_controller->StartMPClient(m_serverAddress);
|
||||
} else {
|
||||
if(m_runSceneName.empty())
|
||||
{
|
||||
m_controller->StartApp();
|
||||
} else {
|
||||
m_controller->GetRobotMain()->ChangePhase(PHASE_USER); // To load userlevel list - TODO: this is ugly
|
||||
m_controller->GetRobotMain()->SetExitAfterMission(true);
|
||||
m_controller->StartSP(m_runSceneName, m_runSceneRank/100, m_runSceneRank%100);
|
||||
}
|
||||
|
|
|
@ -104,6 +104,10 @@ void CClientConnection::PacketLevelData(std::string data)
|
|||
ar & m_levelData;
|
||||
|
||||
// Load the map now
|
||||
if(m_mapName == "custom")
|
||||
{
|
||||
CController::GetInstancePointer()->GetRobotMain()->ChangePhase(PHASE_USER); // To load userlevel list - TODO: this is ugly
|
||||
}
|
||||
CController::GetInstancePointer()->GetMainDialog()->SetSceneName(m_mapName.c_str());
|
||||
CController::GetInstancePointer()->GetMainDialog()->SetSceneRank(m_mapRank);
|
||||
CController::GetInstancePointer()->GetRobotMain()->ChangePhase(PHASE_LOADING);
|
||||
|
|
Loading…
Reference in New Issue