MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / CleanUpHook

Method CleanUpHook

extensions/sdktools/output.cpp:252–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252void EntityOutputManager::CleanUpHook(omg_hooks *hook)
253{
254 FreeHooks.push(hook);
255
256 OnHookRemoved();
257
258 IPlugin *pPlugin = plsys->FindPluginByContext(hook->pf->GetParentContext());
259 SourceHook::List<omg_hooks *> *pList = NULL;
260
261 if (!pPlugin->GetProperty("OutputHookList", (void **)&pList, false) || !pList)
262 {
263 return;
264 }
265
266 SourceHook::List<omg_hooks *>::iterator p_iter = pList->begin();
267
268 omg_hooks *pluginHook;
269
270 while (p_iter != pList->end())
271 {
272 pluginHook = (omg_hooks *)*p_iter;
273 if (pluginHook == hook)
274 {
275 p_iter = pList->erase(p_iter);
276 }
277 else
278 {
279 p_iter++;
280 }
281 }
282}
283
284void EntityOutputManager::OnPluginDestroyed(IPlugin *plugin)
285{

Callers 2

UnHookEntityOutputFunction · 0.80
UnHookSingleEntityOutputFunction · 0.80

Calls 6

GetPropertyMethod · 0.80
pushMethod · 0.45
FindPluginByContextMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected