////////////////////////////////////////////////////////////////////////////
| 2155 | |
| 2156 | ///////////////////////////////////////////////////////////////////////////////// |
| 2157 | int CScriptObjectSystem::ActivatePortal(IFunctionHandler *pH) |
| 2158 | { |
| 2159 | CHECK_PARAMETERS(3); |
| 2160 | |
| 2161 | CScriptObjectVector oPos(m_pScriptSystem,true); |
| 2162 | Vec3 vPos; |
| 2163 | int nID; |
| 2164 | pH->GetParam(1,*oPos); |
| 2165 | vPos=oPos.Get(); |
| 2166 | bool bActivate; |
| 2167 | pH->GetParam(2,bActivate); |
| 2168 | pH->GetParam(3,nID); |
| 2169 | |
| 2170 | IEntity *pEnt = m_pEntitySystem->GetEntity(nID); |
| 2171 | |
| 2172 | // m_p3DEngine->GetBuildingManager()->ActivatePortal(vPos,bActivate,pEnt); |
| 2173 | m_p3DEngine->ActivatePortal(vPos,bActivate,pEnt); |
| 2174 | ISoundSystem *pSS=m_pSystem->GetISoundSystem(); |
| 2175 | |
| 2176 | if (pSS) |
| 2177 | { |
| 2178 | // recompute the sound occlusion to an opened or closed portal |
| 2179 | pSS->RecomputeSoundOcclusion(false,true); |
| 2180 | } |
| 2181 | |
| 2182 | return (pH->EndFunction()); |
| 2183 | } |
| 2184 | |
| 2185 | |
| 2186 | ///////////////////////////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected