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

Method GetObjectAngles

CrySystem/ScriptObjectEntity.cpp:707–723  ·  view source on GitHub ↗

!return the relative orientation 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 orientation of the object(in degrees) */

Source from the content-addressed store, hash-verified

705 @return a table with the x,y,z fields that contain the orientation of the object(in degrees)
706*/
707int CScriptObjectEntity::GetObjectAngles(IFunctionHandler *pH)
708{
709 CHECK_PARAMETERS(1);
710 int nSlot;
711 Vec3 vAng;
712 pH->GetParam(1,nSlot);
713 if(m_pEntity->GetObjectAngles(nSlot,vAng))
714 {
715 m_pObjectAngles->BeginSetGetChain();
716 m_pObjectAngles->SetValueChain("x",vAng.x);
717 m_pObjectAngles->SetValueChain("y",vAng.y);
718 m_pObjectAngles->SetValueChain("z",vAng.z);
719 m_pObjectAngles->EndSetGetChain();
720 return pH->EndFunction(m_pObjectAngles);
721 }
722 return pH->EndFunction();
723}
724
725/*!set the relative orientation in the entity space of a certaing geometry(object) attached to the entity
726 @param nSlot slot of the geometry

Callers 2

LoadVehicleMethod · 0.45
ProcessMovementMethod · 0.45

Calls 5

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

Tested by

no test coverage detected