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

Method GetBBox

CrySystem/ScriptObjectEntity.cpp:2777–2812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2775}
2776
2777int CScriptObjectEntity::GetBBox(IFunctionHandler *pH)
2778{
2779 int phys=0;
2780 pH->GetParam(1,phys);
2781 Vec3 mins,maxs;
2782
2783 CScriptObjectVector minVec(m_pScriptSystem,false);
2784 CScriptObjectVector maxVec(m_pScriptSystem,false);
2785 _SmartScriptObject res(m_pScriptSystem,false);
2786
2787 if (m_pEntity)
2788 {
2789 Vec3 min,max;
2790 if(phys)
2791 {
2792 IPhysicalEntity *pPhysEnt = m_pEntity->GetPhysics();
2793 if(m_pEntity->GetPhysics())
2794 {
2795 pe_status_pos spos;
2796 pPhysEnt->GetStatus( &spos );
2797 min=spos.BBox[0];
2798 max=spos.BBox[1];
2799 }
2800 }
2801 else
2802 {
2803 m_pEntity->GetBBox(min,max);
2804 }
2805 minVec=min;
2806 maxVec=max;
2807 res->SetValue("min",minVec);
2808 res->SetValue("max",maxVec);
2809 }
2810
2811 return pH->EndFunction(res);
2812}
2813
2814int CScriptObjectEntity::GetLocalBBox(IFunctionHandler *pH)
2815{

Callers 2

GetEntitiesInContactMethod · 0.45
AwakeEnvironmentMethod · 0.45

Calls 5

EndFunctionMethod · 0.80
GetParamMethod · 0.45
GetPhysicsMethod · 0.45
GetStatusMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected