| 903 | |
| 904 | |
| 905 | int 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) |
nothing calls this directly
no test coverage detected