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

Method GetObjectPos

CrySystem/ScriptObjectEntity.cpp:668–684  ·  view source on GitHub ↗

!return the relative position in the entity space of a certaing geometry(object) attached to the entity @param nSlot slot of the geometry @return a table with the x,y,z fields that contain the position of the object */

Source from the content-addressed store, hash-verified

666 @return a table with the x,y,z fields that contain the position of the object
667*/
668int CScriptObjectEntity::GetObjectPos(IFunctionHandler *pH)
669{
670 CHECK_PARAMETERS(1);
671 int nSlot;
672 Vec3 vPos;
673 pH->GetParam(1,nSlot);
674 if(m_pEntity->GetObjectPos(nSlot,vPos))
675 {
676 m_pObjectPos->BeginSetGetChain();
677 m_pObjectPos->SetValueChain("x",vPos.x);
678 m_pObjectPos->SetValueChain("y",vPos.y);
679 m_pObjectPos->SetValueChain("z",vPos.z);
680 m_pObjectPos->EndSetGetChain();
681 return pH->EndFunction(m_pObjectPos);
682 }
683 return pH->EndFunction();
684}
685
686/*!set the relative position in the entity space of a certaing geometry(object) attached to the entity
687 @param nSlot slot of the geometry

Callers

nothing calls this directly

Calls 5

BeginSetGetChainMethod · 0.80
SetValueChainMethod · 0.80
EndSetGetChainMethod · 0.80
EndFunctionMethod · 0.80
GetParamMethod · 0.45

Tested by

no test coverage detected