!return the relative position 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 position of the object */
| 666 | @return a table with the x,y,z fields that contain the position of the object |
| 667 | */ |
| 668 | int CScriptObjectEntity::GetObjectPos(IFunctionHandler *pH) |
| 669 | { |
| 670 | CHECK_PARAMETERS(1); |
| 671 | int nSlot; |
| 672 | Vec3 vPos; |
| 673 | pH->GetParam(1,nSlot); |
| 674 | if(m_pEntity->GetObjectPos(nSlot,vPos)) |
| 675 | { |
| 676 | m_pObjectPos->BeginSetGetChain(); |
| 677 | m_pObjectPos->SetValueChain("x",vPos.x); |
| 678 | m_pObjectPos->SetValueChain("y",vPos.y); |
| 679 | m_pObjectPos->SetValueChain("z",vPos.z); |
| 680 | m_pObjectPos->EndSetGetChain(); |
| 681 | return pH->EndFunction(m_pObjectPos); |
| 682 | } |
| 683 | return pH->EndFunction(); |
| 684 | } |
| 685 | |
| 686 | /*!set the relative position in the entity space of a certaing geometry(object) attached to the entity |
| 687 | @param nSlot slot of the geometry |
nothing calls this directly
no test coverage detected