MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / PrepareNavigateSmartObject

Method PrepareNavigateSmartObject

Code/CryEngine/CryAISystem/SmartObjects.cpp:4659–4678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4657}
4658
4659bool CSmartObjectManager::PrepareNavigateSmartObject(CPipeUser* pPipeUser, const GraphNode* pFromNode, const GraphNode* pToNode)
4660{
4661 // Sanity check that the nodes are indeed smart object nodes (the node data is accessed later).
4662 if (pFromNode->navType != IAISystem::NAV_SMARTOBJECT || pToNode->navType != IAISystem::NAV_SMARTOBJECT)
4663 {
4664 if (gAIEnv.CVars.DebugPathFinding)
4665 {
4666 AILogAlways("CAISystem::PrepareNavigateSmartObject %s one of the input nodes is not SmartObject nav node.",
4667 pPipeUser->GetName());
4668 }
4669 return false;
4670 }
4671
4672 CSmartObject* pObject = pFromNode->GetSmartObjectNavData()->pSmartObject;
4673 CSmartObjectClass* pObjectClass = pFromNode->GetSmartObjectNavData()->pClass;
4674 SmartObjectHelper* pFromHelper = pFromNode->GetSmartObjectNavData()->pHelper;
4675 SmartObjectHelper* pToHelper = pToNode->GetSmartObjectNavData()->pHelper;
4676
4677 return PrepareNavigateSmartObject(pPipeUser, pObject, pObjectClass, pFromHelper, pToHelper);
4678}
4679
4680// Called to prepare PipeUser state ready to use a navigation SO. Returns true if successful.
4681bool CSmartObjectManager::PrepareNavigateSmartObject(CPipeUser* pPipeUser, CSmartObject* pObject, CSmartObjectClass* pObjectClass, SmartObjectHelper* pFromHelper, SmartObjectHelper* pToHelper)

Callers 2

Calls 15

AILogAlwaysFunction · 0.85
cry_randomFunction · 0.85
ScriptHandleFunction · 0.85
GetSmartObjectNavDataMethod · 0.80
GetValidationResultMethod · 0.80
FormatMethod · 0.80
asIntMethod · 0.80
GetOrientationMethod · 0.80
ReleaseFuncMethod · 0.80
swapFunction · 0.50
GetNameMethod · 0.45

Tested by

no test coverage detected