MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / ActivatePortal

Method ActivatePortal

CrySystem/ScriptObjectSystem.cpp:2157–2183  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

2155
2156/////////////////////////////////////////////////////////////////////////////////
2157int 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/////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 6

GetISoundSystemMethod · 0.80
EndFunctionMethod · 0.80
GetParamMethod · 0.45
GetMethod · 0.45
GetEntityMethod · 0.45

Tested by

no test coverage detected