///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// int CScriptObjectSystem::PostMessage(IFunctionHandler *pH) { CHECK_PARAMETERS(1); const char *sParam; IProcess *pProcess = m_pSystem->GetIProcess(); pH->GetParam(1, sParam); m_pGame->SendMessage(sParam); return pH->EndFunction();
| 676 | @param nID the entity id |
| 677 | */ |
| 678 | int CScriptObjectSystem::GetEntity(IFunctionHandler *pH) |
| 679 | { |
| 680 | CHECK_PARAMETERS(1); |
| 681 | IEntity *pEntity; |
| 682 | IScriptObject *pObject; |
| 683 | int nID; |
| 684 | pH->GetParam(1,nID); |
| 685 | pEntity=m_pEntitySystem->GetEntity(nID); |
| 686 | if(pEntity){ |
| 687 | pObject=pEntity->GetScriptObject(); |
| 688 | return pH->EndFunction(pObject); |
| 689 | } |
| 690 | else |
| 691 | { |
| 692 | return pH->EndFunctionNull(); |
| 693 | } |
| 694 | } |
| 695 | ///////////////////////////////////////////////////////////////////////////////// |
| 696 | ///////////////////////////////////////////////////////////////////////////////// |
| 697 | /*!return a all entities currently present in the level |
no test coverage detected