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

Method GetCameraPosition

CrySystem/ScriptObjectEntity.cpp:2579–2599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2577}
2578
2579int CScriptObjectEntity::GetCameraPosition(IFunctionHandler *pH)
2580{
2581 Vec3 vPos;
2582 IEntityCamera *pICam = NULL;
2583
2584 CHECK_PARAMETERS(0);
2585
2586 pICam = m_pEntity->GetCamera();
2587
2588 if (!pICam)
2589 return pH->EndFunction();
2590
2591 vPos = pICam->GetPos();
2592
2593 m_pCameraPosition->SetValue("x", vPos.x);
2594 m_pCameraPosition->SetValue("y", vPos.y);
2595 m_pCameraPosition->SetValue("z", vPos.z);
2596 return pH->EndFunction(m_pCameraPosition);
2597
2598
2599}
2600
2601int CScriptObjectEntity::GetCameraAngles(IFunctionHandler *pH)
2602{

Callers

nothing calls this directly

Calls 4

GetCameraMethod · 0.80
EndFunctionMethod · 0.80
GetPosMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected