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

Method GetAngles

CrySystem/ScriptObjectEntity.cpp:964–983  ·  view source on GitHub ↗

!get the orientation of the entity in world space @param [optional] if the parameter is present return the real angles if not the entity angles NOTE: if the entity is bound to another parent entity the real angles are the absolute angles if is not bound there is no difference @return a table containing the x,y,z fields that specify the orientation of the entity(in degrees) */

Source from the content-addressed store, hash-verified

962 @return a table containing the x,y,z fields that specify the orientation of the entity(in degrees)
963*/
964int CScriptObjectEntity::GetAngles(IFunctionHandler *pH)
965{
966// CHECK_PARAMETERS(0);
967 assert(pH->GetParamCount() == 0 || pH->GetParamCount() == 1);
968
969 Ang3 vec;
970 if(pH->GetParamCount() == 0)
971 vec=m_pEntity->GetAngles(0);
972 else
973 vec=m_pEntity->GetAngles(1);
974 vec.Snap360();
975
976
977 m_pObjectAngles->BeginSetGetChain();
978 m_pObjectAngles->SetValueChain("x",vec.x);
979 m_pObjectAngles->SetValueChain("y",vec.y);
980 m_pObjectAngles->SetValueChain("z",vec.z);
981 m_pObjectAngles->EndSetGetChain();
982 return pH->EndFunction(m_pObjectAngles);
983}
984
985// Get Forward direction if no parameters
986// if parameter is passed - get Up direction

Callers 7

SetListenerMethod · 0.45
GetDirectionVectorMethod · 0.45
GetCameraAnglesMethod · 0.45
BreakEntityMethod · 0.45
GetBonePosMethod · 0.45
GetBoneDirMethod · 0.45

Calls 6

Snap360Method · 0.80
BeginSetGetChainMethod · 0.80
SetValueChainMethod · 0.80
EndSetGetChainMethod · 0.80
EndFunctionMethod · 0.80
GetParamCountMethod · 0.45

Tested by

no test coverage detected