| 116 | } |
| 117 | |
| 118 | void CSystem::CreateEntityScriptBinding(IEntity *ent) |
| 119 | { |
| 120 | CScriptObjectEntity *pSEntity = new CScriptObjectEntity(); |
| 121 | pSEntity->Create(m_pScriptSystem, this); |
| 122 | assert(pSEntity->GetScriptObject()); |
| 123 | if (ent->GetContainer()){ |
| 124 | IScriptObject *pObj=ent->GetContainer()->GetScriptObject(); |
| 125 | if(pObj) |
| 126 | pSEntity->SetContainer(pObj); |
| 127 | } |
| 128 | assert(pSEntity->GetScriptObject()); |
| 129 | pSEntity->SetEntity(ent); |
| 130 | assert(pSEntity->GetScriptObject()); |
| 131 | ent->SetScriptObject(pSEntity->GetScriptObject()); |
| 132 | assert(pSEntity->GetScriptObject()); |
| 133 | assert(ent->GetScriptObject()); |
| 134 | } |
no test coverage detected