///////////////////////////////////////////////////////////////// load level batch process
| 72 | ////////////////////////////////////////////////////////////////////// |
| 73 | // load level batch process |
| 74 | bool 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 | ////////////////////////////////////////////////////////////////////////// |
no test coverage detected