Пример #1
0
void CCheatMgr::ToggleEndgameFlag()
{
	
	CRegMgr* pRegMgr = g_pVersionMgr->GetRegMgr();
	if (pRegMgr->IsValid())
	{
		uint32 nDone = pRegMgr->Get("EndGame",0);
		pRegMgr->Set("EndGame",!nDone);
	}

}
Пример #2
0
void CScreenSingle::OnFocus(LTBOOL bFocus)
{
	if (bFocus)
	{
		// We should not be connected to a server at this point.
		if(g_pLTClient->IsConnected())
		{
			_ASSERT(!"ERROR: ClientMultiplayerMgr::StartClient( ) : Already connected!");
			g_pLTClient->Disconnect();
		}

		// Initialize to the sp mission bute.
		if( !g_pMissionButeMgr->Init( MISSION_DEFAULT_FILE ))
		{
			g_pLTClient->ShutdownWithMessage("Could not load mission bute %s.", MISSION_DEFAULT_FILE );
			return;
  		}

		m_pLoadCtrl->Enable( g_pClientSaveLoadMgr->ReloadSaveExists() );
		m_pDiff->Show(LTFALSE);
		m_pDiffFrame->Show(LTFALSE);


		m_pChapter->Show(LTFALSE);
		m_pChapterFrame->Show(LTFALSE);


#ifndef _REMOVE_CUSTOM_LEVELS
		m_pCustom->Show(LTFALSE);
		m_pCustomFrame->Show(LTFALSE);
#endif _REMOVE_CUSTOM_LEVELS

		//have they completed game?
		LTBOOL bCompleted = LTFALSE;
		CRegMgr* pRegMgr = g_pVersionMgr->GetRegMgr();
		if (pRegMgr->IsValid())
		{
			bCompleted = (pRegMgr->Get("EndGame") > 0);
		}

		m_pChapterCtrl->Show(bCompleted);

		if (bCompleted && m_pChapter->GetNumControls() == 0)
			BuildChapterList();






	}

	CBaseScreen::OnFocus(bFocus);
}