Пример #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
bool CMissionMgr::HandleEndGame( ILTMessage_Read& msg  )
{
	// Go to the main menu.
	g_pInterfaceMgr->ChangeState(GS_SCREEN);

	m_bGameOver = true;

	if (g_pGameClientShell->IsRunningPerformanceTest())
	{
		//since our history was cleared by loading the level... rebuild it
		g_pInterfaceMgr->GetScreenMgr()->AddScreenToHistory( SCREEN_ID_MAIN );
		g_pInterfaceMgr->GetScreenMgr()->AddScreenToHistory( SCREEN_ID_OPTIONS );
	
		//we're done performance testing go back to performance screen
		g_pInterfaceMgr->SwitchToScreen(SCREEN_ID_PERFORMANCE);
	}
	else if (IsMultiplayerGame())
	{
		switch( g_pGameClientShell->GetGameType( ))
		{
			case eGameTypeCooperative:
				g_pInterfaceMgr->SwitchToScreen(SCREEN_ID_END_COOP_MISSION);
				break;
			case eGameTypeDeathmatch:
			case eGameTypeTeamDeathmatch:
			case eGameTypeDoomsDay:
				g_pInterfaceMgr->SwitchToScreen(SCREEN_ID_END_DM_MISSION);
				break;
		}
	}
	else
	{
		g_pInterfaceMgr->SwitchToScreen(SCREEN_ID_END_MISSION);

		//record the completion
		CRegMgr* pRegMgr = g_pVersionMgr->GetRegMgr();
		if (pRegMgr->IsValid())
		{
			pRegMgr->Set("EndGame",1);
		}

	}

	return true;
}