1.1 --- a/extensions/sdktools/output.cpp Sat Apr 12 00:58:34 2008 +0000
1.2 +++ b/extensions/sdktools/output.cpp Sat Apr 12 01:33:55 2008 +0000
1.3 @@ -35,6 +35,45 @@
1.4 ISourcePawnEngine *spengine = NULL;
1.5 EntityOutputManager g_OutputManager;
1.6
1.7 +EntityOutputManager::EntityOutputManager()
1.8 +{
1.9 + info_address = NULL;
1.10 + info_callback = NULL;
1.11 + HookCount = 0;
1.12 + is_detoured = false;
1.13 + enabled = false;
1.14 +}
1.15 +
1.16 +EntityOutputManager::~EntityOutputManager()
1.17 +{
1.18 + if (!enabled)
1.19 + {
1.20 + return;
1.21 + }
1.22 +
1.23 + EntityOutputs->Destroy();
1.24 + ClassNames->Destroy();
1.25 + ShutdownFireEventDetour();
1.26 +}
1.27 +
1.28 +void EntityOutputManager::Init()
1.29 +{
1.30 + enabled = CreateFireEventDetour();
1.31 +
1.32 + if (!enabled)
1.33 + {
1.34 + return;
1.35 + }
1.36 +
1.37 + EntityOutputs = adtfactory->CreateBasicTrie();
1.38 + ClassNames = adtfactory->CreateBasicTrie();
1.39 +}
1.40 +
1.41 +bool EntityOutputManager::IsEnabled()
1.42 +{
1.43 + return enabled;
1.44 +}
1.45 +
1.46 bool EntityOutputManager::CreateFireEventDetour()
1.47 {
1.48 if (!g_pGameConf->GetMemSig("FireOutput", &info_address) || !info_address)