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

Method GetPos

CrySystem/ScriptObjectEntity.cpp:390–410  ·  view source on GitHub ↗

! Get the position of the entity @return Three component vector containing the entity position */

Source from the content-addressed store, hash-verified

388 @return Three component vector containing the entity position
389*/
390int CScriptObjectEntity::GetPos(IFunctionHandler *pH)
391{
392 CHECK_PARAMETERS(0);
393 Vec3 vec;
394#ifndef USE_MEMBER_POS
395 CScriptObjectVector oVec(m_pScriptSystem);
396// vec=m_pEntity->GetPos(false);
397 vec=m_pEntity->GetPos(true);
398 oVec=vec;
399 return pH->EndFunction(*oVec);
400#else
401 vec=m_pEntity->GetPos(true);
402 m_pObjectPos->BeginSetGetChain();
403 m_pObjectPos->SetValueChain("x",vec.x);
404 m_pObjectPos->SetValueChain("y",vec.y);
405 m_pObjectPos->SetValueChain("z",vec.z);
406 m_pObjectPos->EndSetGetChain();
407 return pH->EndFunction(m_pObjectPos);
408#endif
409
410}
411
412
413/*! Get the position of the entity's physical center of mass

Callers 11

UpdateMethod · 0.45
GetViewCameraPosMethod · 0.45
GetCenterOfMassPosMethod · 0.45
AddImpulseObjMethod · 0.45
IsPointWithinRadiusMethod · 0.45
GetDistanceFromPointMethod · 0.45
GetCameraPositionMethod · 0.45
BreakEntityMethod · 0.45
GetBonePosMethod · 0.45
DoHamMethod · 0.45
RenderMethod · 0.45

Calls 4

EndFunctionMethod · 0.80
BeginSetGetChainMethod · 0.80
SetValueChainMethod · 0.80
EndSetGetChainMethod · 0.80

Tested by

no test coverage detected