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

Method CreateSoftEntity

CrySystem/ScriptObjectEntity.cpp:905–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

903
904
905int CScriptObjectEntity::CreateSoftEntity(IFunctionHandler *pH)
906{
907 assert(pH->GetParamCount()>=2);
908 float fMass,fDensity;
909 int bCloth=1;
910 IEntity *pEnt;
911 IPhysicalEntity *pPhysEnt = WORLD_ENTITY;
912 int idEnt,iPart=-1;
913 pH->GetParam(1,fMass);
914 pH->GetParam(2,fDensity);
915 pH->GetParam(3, bCloth);
916 if (pH->GetParam(4, idEnt) && idEnt>=0 && (pEnt = m_pEntitySystem->GetEntity(idEnt)))
917 if (!(pPhysEnt = pEnt->GetPhysics()))
918 pPhysEnt = WORLD_ENTITY;
919 pH->GetParam(5, iPart);
920
921 m_pEntity->CreateSoftEntity(fMass,fDensity, bCloth!=0, pPhysEnt,iPart);
922 return pH->EndFunction();
923}
924
925/*!set the orientation of the entity in world space
926 @param a table containing the x,y,z fields that specify the orientation of the entity(in degrees)

Callers

nothing calls this directly

Calls 5

EndFunctionMethod · 0.80
GetParamCountMethod · 0.45
GetParamMethod · 0.45
GetEntityMethod · 0.45
GetPhysicsMethod · 0.45

Tested by

no test coverage detected