MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / LoadLevelForEditor

Method LoadLevelForEditor

CryGame/GameLoading.cpp:74–96  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////// load level batch process

Source from the content-addressed store, hash-verified

72//////////////////////////////////////////////////////////////////////
73// load level batch process
74bool CXGame::LoadLevelForEditor(const char *pszLevelDirectory, const char *pszMissionName)
75{
76 if (pszMissionName)
77 m_currentMission = pszMissionName;
78
79 // start local server
80 if(!StartupServer(false,"__editor__"))
81 return false;
82
83 //////////////////////////////////////////////////////////////////////////
84 // Init common stuff.
85 //////////////////////////////////////////////////////////////////////////
86 //init the entity registry
87 m_pServer->m_pISystem->LoadLevel( pszLevelDirectory,m_currentMission.c_str(),true );
88
89 // start local client and connect
90 if(!StartupLocalClient())
91 return false;
92
93 m_pClient->XConnect("localhost");
94 m_pSystem->GetIInput()->GetIKeyboard()->ClearKeyState();
95 return true;
96}
97
98#define TABLE_END (-1) // a value not used in enum ScriptVarType
99//////////////////////////////////////////////////////////////////////////

Callers 1

ResetResourcesMethod · 0.80

Calls 6

XConnectMethod · 0.80
GetIKeyboardMethod · 0.80
LoadLevelMethod · 0.45
c_strMethod · 0.45
ClearKeyStateMethod · 0.45
GetIInputMethod · 0.45

Tested by

no test coverage detected