Example #1
0
//------------------------------------------------------------------------
void CEditorGame::OnBeforeLevelLoad()
{
	EnablePlayer(false);
	ConfigureNetContext(true);
	SetGameRules();
	m_pGame->GetIGameFramework()->GetILevelSystem()->OnLoadingStart(0);
}
Example #2
0
void CEditorGame::ResetClient(IConsoleCmdArgs*)
{
	bool value = s_pEditorGame->m_bPlayer;
	s_pEditorGame->EnablePlayer(false);

	IEntityClass *pClass = gEnv->pEntitySystem->GetClassRegistry()->FindClass("Player");
	if (pClass)	pClass->LoadScript(true);

	if (value)
	{
		s_pEditorGame->ConfigureNetContext(true);
		SetGameRules();
	}
	s_pEditorGame->EnablePlayer(value);
	s_pEditorGame->HidePlayer(true);
}
//------------------------------------------------------------------------
void CEditorGame::ToggleMultiplayerGameRules()
{
	m_bUsingMultiplayerGameRules = !m_bUsingMultiplayerGameRules;
	bool value = s_pEditorGame->m_bPlayer;
	s_pEditorGame->EnablePlayer(false);
	s_pEditorGame->ConfigureNetContext(true);
	IEntityClass *pClass = gEnv->pEntitySystem->GetClassRegistry()->FindClass("Player");

	if (pClass)
	{
		pClass->LoadScript(true);
	}

	SetGameRules();
	s_pEditorGame->EnablePlayer(value);
	s_pEditorGame->HidePlayer(true);
	gEnv->pConsole->ShowConsole(false);
}