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

Method LoadAI

Editor/GameEngine.cpp:434–461  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

432
433//////////////////////////////////////////////////////////////////////////
434bool CGameEngine::LoadAI( const CString &levelName,const CString &missionName )
435{
436 if (!m_IAISystem)
437 return false;
438 if (!IsLevelLoaded())
439 return false;
440
441 CLogFile::FormatLine( "Loading AI Triangulation %s, %s",(const char*)levelName,(const char*)missionName );
442
443 m_IAISystem->FlushSystem();
444 GetIEditor()->GetObjectManager()->SendEvent( EVENT_CLEAR_AIGRAPH );
445 m_IAISystem->LoadTriangulation( levelName,missionName );
446 m_IAISystem->GetNodeGraph()->RemoveIndoorNodes();
447
448 /*
449 // Call OnReset for all entities.
450 IEntityIt *entityIt = m_IEntitySystem->GetEntityIterator();
451 if (entityIt)
452 {
453 for (IEntity *entity = entityIt->Next(); entity != 0; entity = entityIt->Next())
454 {
455 CLogFile::FormatLine( "Reseting: %s, Class: %s",entity->GetName(),entity->GetEntityClassName() );
456 entity->Reset();
457 }
458 }
459 */
460 return true;
461}
462
463//////////////////////////////////////////////////////////////////////////
464bool CGameEngine::LoadMission( const CString &mission )

Callers 1

SyncContentMethod · 0.80

Calls 4

GetIEditorFunction · 0.85
RemoveIndoorNodesMethod · 0.80
SendEventMethod · 0.45
GetObjectManagerMethod · 0.45

Tested by

no test coverage detected