fixed crash bug on shutdown
removed implementations from header --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402043
This commit is contained in:
parent
75a77c1925
commit
c42a26bb66
@ -35,6 +35,45 @@
|
||||
ISourcePawnEngine *spengine = NULL;
|
||||
EntityOutputManager g_OutputManager;
|
||||
|
||||
EntityOutputManager::EntityOutputManager()
|
||||
{
|
||||
info_address = NULL;
|
||||
info_callback = NULL;
|
||||
HookCount = 0;
|
||||
is_detoured = false;
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
EntityOutputManager::~EntityOutputManager()
|
||||
{
|
||||
if (!enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EntityOutputs->Destroy();
|
||||
ClassNames->Destroy();
|
||||
ShutdownFireEventDetour();
|
||||
}
|
||||
|
||||
void EntityOutputManager::Init()
|
||||
{
|
||||
enabled = CreateFireEventDetour();
|
||||
|
||||
if (!enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EntityOutputs = adtfactory->CreateBasicTrie();
|
||||
ClassNames = adtfactory->CreateBasicTrie();
|
||||
}
|
||||
|
||||
bool EntityOutputManager::IsEnabled()
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
|
||||
bool EntityOutputManager::CreateFireEventDetour()
|
||||
{
|
||||
if (!g_pGameConf->GetMemSig("FireOutput", &info_address) || !info_address)
|
||||
|
@ -91,39 +91,12 @@ struct ClassNameStruct
|
||||
class EntityOutputManager : public IPluginsListener
|
||||
{
|
||||
public:
|
||||
EntityOutputManager()
|
||||
{
|
||||
info_address = NULL;
|
||||
info_callback = NULL;
|
||||
HookCount = 0;
|
||||
is_detoured = false;
|
||||
enabled = false;
|
||||
}
|
||||
EntityOutputManager();
|
||||
~EntityOutputManager();
|
||||
public:
|
||||
void Init();
|
||||
|
||||
~EntityOutputManager()
|
||||
{
|
||||
EntityOutputs->Destroy();
|
||||
ClassNames->Destroy();
|
||||
ShutdownFireEventDetour();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
enabled = CreateFireEventDetour();
|
||||
|
||||
if (!enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EntityOutputs = adtfactory->CreateBasicTrie();
|
||||
ClassNames = adtfactory->CreateBasicTrie();
|
||||
}
|
||||
|
||||
bool IsEnabled()
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
bool IsEnabled();
|
||||
|
||||
void FireEventDetour(void *pOutput, CBaseEntity *pActivator, CBaseEntity *pCaller, float fDelay);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user