| 250 | } |
| 251 | |
| 252 | void 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 | |
| 284 | void EntityOutputManager::OnPluginDestroyed(IPlugin *plugin) |
| 285 | { |
no test coverage detected